shaders 3.2.475 → 4.0.0

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 (753) hide show
  1. package/LICENSE +21 -142
  2. package/README.md +192 -19
  3. package/dist/cli.js +2 -2
  4. package/dist/core/{AngularBlur-Cx1HVeYk.js → AngularBlur-BEBs-lRR.js} +2 -3
  5. package/dist/core/{Arc-D3FuqnDL.js → Arc-D-WnjM7T.js} +1 -3
  6. package/dist/core/{Ascii-Dhn0H0LB.js → Ascii-BGPIwMc3.js} +2 -5
  7. package/dist/core/{Aurora-BUfyvIyq.js → Aurora-DqJBPdMQ.js} +2 -11
  8. package/dist/core/{BarShift-v3D-9Lx4.js → BarShift-BcCOweUh.js} +2 -3
  9. package/dist/core/{BarnDoors-C5g6Sbze.js → BarnDoors-B9B-AmCV.js} +2 -3
  10. package/dist/core/{Beam-CV5g8m92.js → Beam-QG_9OS8I.js} +2 -3
  11. package/dist/core/{Bend-BFWQSHF7.js → Bend-Cy9VAowL.js} +1 -2
  12. package/dist/core/{Blob-CLvqov4O.js → Blob-C3txJeW0.js} +2 -10
  13. package/dist/core/{BlockDissolve-DER9y4PE.js → BlockDissolve-C1SFUys7.js} +2 -3
  14. package/dist/core/{BlockNoise-DpXWJkDL.js → BlockNoise-Cm3y8hce.js} +2 -4
  15. package/dist/core/{BlueNoise-CSQPDpkm.js → BlueNoise-BCLObOMm.js} +2 -4
  16. package/dist/core/{Blur-B-Tg7Sfr.js → Blur-Dg29SnXd.js} +1 -2
  17. package/dist/core/{Boids-BZo85-QR.js → Boids-rsGsPN5h.js} +2 -5
  18. package/dist/core/{BokehBlur-B1tY-T6q.js → BokehBlur-rFSFEnb0.js} +2 -3
  19. package/dist/core/{BrickPattern-DVhe3RgK.js → BrickPattern-DqN6JKEN.js} +2 -3
  20. package/dist/core/{BrightnessContrast-DBLjHzyE.js → BrightnessContrast-J9fCSBiC.js} +1 -3
  21. package/dist/core/{BrushedMetal-CpXTd3nZ.js → BrushedMetal-74wSZKjG.js} +3 -8
  22. package/dist/core/{Bulge-CHcE-9Oo.js → Bulge-BIk0oq8j.js} +1 -2
  23. package/dist/core/{CRTScreen-CyBtBJS4.js → CRTScreen-hEH-JNRd.js} +2 -3
  24. package/dist/core/{CarbonFiber-DK-0jUEs.js → CarbonFiber-CZdUDvRU.js} +3 -7
  25. package/dist/core/{Chalkboard-PmgH_OhS.js → Chalkboard-CClJHqvs.js} +2 -3
  26. package/dist/core/{ChannelBlur-J3MHHcGy.js → ChannelBlur-BEuEwQOC.js} +1 -2
  27. package/dist/core/{CheckerWipe-Dj2kjjDA.js → CheckerWipe-KuAWj2qg.js} +2 -3
  28. package/dist/core/{Checkerboard-eFWETR1S.js → Checkerboard-Rq9ze1W3.js} +2 -3
  29. package/dist/core/{Chevron-ColsT0Fy.js → Chevron-C1j6X2Ye.js} +2 -3
  30. package/dist/core/{ChromaFlow-DrdCgPGz.js → ChromaFlow-BgsCUYIl.js} +2 -5
  31. package/dist/core/{ChromaticAberration-C_It6mLf.js → ChromaticAberration-2_4tjQ0u.js} +2 -4
  32. package/dist/core/{Chrome-2WZpUHiT.js → Chrome-Be3z6C5i.js} +4 -10
  33. package/dist/core/{Circle-C-AKxSw4.js → Circle-e_qQI3tU.js} +1 -3
  34. package/dist/core/{ColorWheel-DfF0tqXE.js → ColorWheel-s5ep1H7d.js} +2 -3
  35. package/dist/core/{CompressionArtifacts-Zvwlutd7.js → CompressionArtifacts-OE9U9Qrq.js} +1 -3
  36. package/dist/core/{ConcentricSpin-tC8mylMA.js → ConcentricSpin-CLE_5yCJ.js} +1 -2
  37. package/dist/core/{ConicGradient-CNYvyjSs.js → ConicGradient-Cji2SgVO.js} +2 -4
  38. package/dist/core/{ContourLines-C4642NJd.js → ContourLines-wpPK00cF.js} +2 -3
  39. package/dist/core/{CornerPin-BF5gFRv9.js → CornerPin-gYU0Uf2m.js} +2 -3
  40. package/dist/core/{Crescent-wC0IwPjx.js → Crescent-viNc7Unp.js} +1 -2
  41. package/dist/core/{Cross-BO7JQKSq.js → Cross-DyQSsw_k.js} +1 -2
  42. package/dist/core/{Crystal-BK3ifbmV.js → Crystal-Vjj8azWg.js} +4 -9
  43. package/dist/core/{CurlNoise-UbI-Zda_.js → CurlNoise-C7PHjDht.js} +2 -4
  44. package/dist/core/{CursorRipples-rJlfKhyh.js → CursorRipples-BzPPNkA3.js} +3 -39
  45. package/dist/core/{CursorTrail-BuyQdFKJ.js → CursorTrail-cBj0AuQA.js} +2 -4
  46. package/dist/core/{DataMosh-C_ZI55Qq.js → DataMosh-5Yr9TyVx.js} +1 -3
  47. package/dist/core/{DiamondGradient-CPhUCUoq.js → DiamondGradient-DZM7HwF5.js} +2 -4
  48. package/dist/core/{DiamondWipe-y6uIpJM4.js → DiamondWipe-CqeT7lCt.js} +2 -3
  49. package/dist/core/{DiffuseBlur-BNxowfOL.js → DiffuseBlur-Y5hSDTZF.js} +2 -3
  50. package/dist/core/{DisplacementMap-BuM2b1nC.js → DisplacementMap-FobRx5Ie.js} +2 -3
  51. package/dist/core/{Dither-Bt1qdRag.js → Dither-50rqHpt9.js} +2 -3
  52. package/dist/core/{DotGrid-DJFnwMVS.js → DotGrid-B6AGLUbR.js} +3 -4
  53. package/dist/core/{DropShadow-C-IfgfyH.js → DropShadow-CEPpgatB.js} +2 -3
  54. package/dist/core/{Duotone-DML_9JhJ.js → Duotone-D76Kp7Pb.js} +2 -3
  55. package/dist/core/{Ellipse-BuNUnN8D.js → Ellipse-BGod1LeG.js} +1 -2
  56. package/dist/core/{Emboss-DvKk4zwp.js → Emboss-DMNFb_ww.js} +3 -6
  57. package/dist/core/{Engraving-DPFVnIjD.js → Engraving-Dj7bCATQ.js} +2 -3
  58. package/dist/core/{ErosionNoise-j_b7a5cl.js → ErosionNoise-4O68wJQZ.js} +2 -4
  59. package/dist/core/{Exposure-DALA5K55.js → Exposure-h-vapOpj.js} +1 -3
  60. package/dist/core/{FallingLines-CeMOKpxK.js → FallingLines-Dzop_89k.js} +2 -3
  61. package/dist/core/{FilmGrain-DsDYCjjs.js → FilmGrain-Bs8PCfdf.js} +1 -3
  62. package/dist/core/{FilmStock-DtDMkwF6.js → FilmStock-DBjVo6rL.js} +1 -4
  63. package/dist/core/{Flip-B9Av9MVn.js → Flip-CfrS4KfZ.js} +2 -3
  64. package/dist/core/{FloatingParticles-BcMOBX1m.js → FloatingParticles-D1R2tD2J.js} +2 -5
  65. package/dist/core/{FlowField-BunLIU80.js → FlowField-Slirm5AI.js} +2 -3
  66. package/dist/core/{Flower-CvqBYUCU.js → Flower-Ddlut7QZ.js} +1 -2
  67. package/dist/core/{FlowingGradient-DQ284uMb.js → FlowingGradient-CwIgTtbj.js} +2 -7
  68. package/dist/core/{FlutedGlass-BP7av96Y.js → FlutedGlass-CMMy2GJ5.js} +2 -4
  69. package/dist/core/{Fog-DyyljY9e.js → Fog-DjjUkcTZ.js} +2 -4
  70. package/dist/core/{Form3D-x-G-Lz4z.js → Form3D-DQDOHWpC.js} +2 -4
  71. package/dist/core/{FractalNoise-DTgEv-Hq.js → FractalNoise-BjI3IOIj.js} +2 -4
  72. package/dist/core/{Frost-BhMELsXw.js → Frost-CK12HnL1.js} +3 -8
  73. package/dist/core/{GaborNoise-B7kmxcRZ.js → GaborNoise-DKEIvvRJ.js} +3 -5
  74. package/dist/core/{Glass-BMCOKCUL.js → Glass-CzcOVD5Y.js} +3 -8
  75. package/dist/core/{GlassTiles-DgVooh8h.js → GlassTiles-gjhc563g.js} +1 -2
  76. package/dist/core/{Glitch-D0pvMdGd.js → Glitch-C_XAWltC.js} +1 -2
  77. package/dist/core/{Glow-CJ3i0al6.js → Glow-CrYCanBI.js} +1 -3
  78. package/dist/core/{Godrays-DOV1VQ9x.js → Godrays-BBTMOVLP.js} +2 -3
  79. package/dist/core/{Goo-sMwsU21Y.js → Goo-Brhjk8aS.js} +3 -8
  80. package/dist/core/{GradientMap-CCuimQDS.js → GradientMap-C5325QWw.js} +2 -4
  81. package/dist/core/{Grayscale-DR1xnpde.js → Grayscale-dPjs-wvf.js} +1 -2
  82. package/dist/core/{Grid-CCUodqje.js → Grid-UjEd3O76.js} +3 -4
  83. package/dist/core/{GridDistortion-DUnC2Z_Y.js → GridDistortion-vVgYya1U.js} +1 -5
  84. package/dist/core/{Group--MS8ZNKg.js → Group-KVdmAi5g.js} +1 -1
  85. package/dist/core/{HTMLInCanvas-D_Rc6bs1.js → HTMLInCanvas-CKr2u76R.js} +1 -2
  86. package/dist/core/{Halftone-CG1LNQkk.js → Halftone-pRV3TRUW.js} +2 -3
  87. package/dist/core/{Heart-qPxh2CWp.js → Heart-CX7MvvHZ.js} +1 -2
  88. package/dist/core/{Heatmap-BZDfR2vC.js → Heatmap-Dn6qyd2e.js} +3 -8
  89. package/dist/core/{HexGrid-DquaiXLF.js → HexGrid-BIfYhkfV.js} +3 -4
  90. package/dist/core/{Hologram-JAXPZFx0.js → Hologram-ou27baPQ.js} +3 -7
  91. package/dist/core/{Holographic-BBHJp93D.js → Holographic-CiHdBSMg.js} +3 -7
  92. package/dist/core/{HueShift-a1Hl7gFy.js → HueShift-CG7pcXfg.js} +1 -3
  93. package/dist/core/{ImageTexture-CLW3uX1b.js → ImageTexture-BiZuU58C.js} +1 -2
  94. package/dist/core/{InkFlow-Dfd_5vYf.js → InkFlow-D9_L7opB.js} +2 -5
  95. package/dist/core/{Invert-DBEURmcL.js → Invert-CHEaiQZO.js} +1 -2
  96. package/dist/core/{IrisWipe-DTlGb8v-.js → IrisWipe-x22vOQHm.js} +2 -3
  97. package/dist/core/Irradiance-7yq2K87_.js +389 -0
  98. package/dist/core/{IsometricCubes-BgmQXJXU.js → IsometricCubes-CkPGWr7M.js} +2 -3
  99. package/dist/core/{Kaleidoscope-0adfaQ5F.js → Kaleidoscope-CEC5m1Ww.js} +1 -2
  100. package/dist/core/{KeyFrames-BqANGVzW.js → KeyFrames-BMGEZsAZ.js} +2 -3
  101. package/dist/core/{LensDistortion-DVRKCZv8.js → LensDistortion-DKo8PiO5.js} +2 -3
  102. package/dist/core/{LensFlare-C41jY4jH.js → LensFlare-DMS-NUtK.js} +2 -3
  103. package/dist/core/LightEdge-DxmnCRls.js +315 -0
  104. package/dist/core/{LightLeak-GWrDFcI_.js → LightLeak-yoEsZtYg.js} +2 -4
  105. package/dist/core/{Line-DuV7dLdM.js → Line-D17XDUjO.js} +2 -3
  106. package/dist/core/{LinearBlur-Bft2CjmO.js → LinearBlur-CiyjPTUH.js} +2 -3
  107. package/dist/core/{LinearGradient-BzIE4ReW.js → LinearGradient-DfjKG70q.js} +2 -4
  108. package/dist/core/{LinearWipe-ArRG9OCp.js → LinearWipe-D9CtBg6S.js} +2 -3
  109. package/dist/core/{LiquidMetal-BgvfhyiQ.js → LiquidMetal-8EG6DwV6.js} +3 -8
  110. package/dist/core/{Liquify-B6EigQqP.js → Liquify-BySXF1OB.js} +1 -4
  111. package/dist/core/{MagneticFilings-Dj35dlIq.js → MagneticFilings-DNESH3Zs.js} +2 -5
  112. package/dist/core/{Marble-0kfSSCDj.js → Marble-C9WvdxrP.js} +2 -7
  113. package/dist/core/{MeshGradient-DY_rUhFv.js → MeshGradient-d9--RXOU.js} +2 -10
  114. package/dist/core/{Mirror-C1AIyKmb.js → Mirror-1V2FF2kD.js} +1 -2
  115. package/dist/core/{MultiPointGradient-B9z1J-d8.js → MultiPointGradient-cRA9ytgL.js} +2 -3
  116. package/dist/core/{Nebula-mZDwq-yl.js → Nebula-BRV-q74y.js} +4 -87
  117. package/dist/core/{Neon-CyQE26dS.js → Neon-4PemK9Rj.js} +3 -6
  118. package/dist/core/{NoiseDissolve-DQbBbxlP.js → NoiseDissolve-B7LgD46G.js} +2 -3
  119. package/dist/core/{ObjectTracker-CZd20LeZ.js → ObjectTracker-CdzDxhpy.js} +2 -3
  120. package/dist/core/{Obsidian-CjKezopV.js → Obsidian-2J1eX9kT.js} +3 -9
  121. package/dist/core/{PagePeel-ulnjqZzc.js → PagePeel-D-ziraOm.js} +1 -2
  122. package/dist/core/{Paper-c_1INiUk.js → Paper-BxzCLyzB.js} +1 -2
  123. package/dist/core/{Parallelogram-CnjzV4-0.js → Parallelogram-D4OflTwn.js} +1 -2
  124. package/dist/core/{ParticleField-yJztI6Ts.js → ParticleField-tWNicEDO.js} +1 -4
  125. package/dist/core/{ParticleFlow-DJYrNrb8.js → ParticleFlow-BiEYFyWR.js} +2 -6
  126. package/dist/core/{Particles-kT-8Aj5V.js → Particles-B7W4yWgo.js} +3 -7
  127. package/dist/core/{PerlinNoise-C_Pczp28.js → PerlinNoise-C-irUxp9.js} +3 -5
  128. package/dist/core/{Perspective-BrbfuYVk.js → Perspective-DlnAW-pe.js} +2 -3
  129. package/dist/core/{PixelSort-DoTMcLz4.js → PixelSort-BBOTYuOE.js} +1 -4
  130. package/dist/core/{PixelThrow-B8pxI6sI.js → PixelThrow-DCJb9Lxd.js} +2 -4
  131. package/dist/core/{Pixelate-DCU9U9Wb.js → Pixelate-CZdwB--K.js} +1 -2
  132. package/dist/core/{Plasma-Xe1I1Mmb.js → Plasma-CTOQJeqy.js} +2 -4
  133. package/dist/core/{Plastic-Ce9dVqPq.js → Plastic-DvyH9x-4.js} +3 -8
  134. package/dist/core/{PolarCoordinates-mtOsxdGf.js → PolarCoordinates-XhdDAOD0.js} +1 -2
  135. package/dist/core/{Polygon-Cv63keGU.js → Polygon-CLohB-Ly.js} +2 -4
  136. package/dist/core/{Posterize-QhGDzUuf.js → Posterize-BAQfnvmK.js} +1 -2
  137. package/dist/core/{Prism-DOXMcTrS.js → Prism-DJVCVAXX.js} +2 -6
  138. package/dist/core/{ProgressiveBlur-sSQrxqcr.js → ProgressiveBlur-Dirva1on.js} +2 -3
  139. package/dist/core/{RadialGradient-DWTDAQnq.js → RadialGradient-DuSKR8Ds.js} +2 -4
  140. package/dist/core/{RadialWipe-HfofRhY0.js → RadialWipe-n8tON7x2.js} +2 -3
  141. package/dist/core/{RandomBars-DspX9Utc.js → RandomBars-BYouiIgQ.js} +2 -3
  142. package/dist/core/{ReactionDiffusion-GsRfnqUY.js → ReactionDiffusion-CHDd3y2q.js} +2 -5
  143. package/dist/core/{RectangularCoordinates-DhPRrTPT.js → RectangularCoordinates-CYFfCawa.js} +1 -2
  144. package/dist/core/{ReflectivePlane-ej7XTkZ-.js → ReflectivePlane-DFTl5U9q.js} +2 -3
  145. package/dist/core/Repeater-CnbzXuAe.js +473 -0
  146. package/dist/core/{Ring-CC1LC05E.js → Ring-CGkHVSVd.js} +1 -2
  147. package/dist/core/{RippleWipe-CmmIx59a.js → RippleWipe-DLjPzY6u.js} +2 -3
  148. package/dist/core/{Ripples-ColS9_ej.js → Ripples-C2tITU62.js} +2 -3
  149. package/dist/core/{RoundedRect-BCL_4FLA.js → RoundedRect-sfNTUaCY.js} +1 -2
  150. package/dist/core/{Saturation-E77lSl0T.js → Saturation-BRkifYWj.js} +1 -3
  151. package/dist/core/{Scratches-ZHohp7K4.js → Scratches-D87O5C2K.js} +2 -4
  152. package/dist/core/{Sharpness-CgNxIvCA.js → Sharpness-BGv613Zw.js} +1 -3
  153. package/dist/core/Shatter-DuyCFU1f.js +328 -0
  154. package/dist/core/{SimplexNoise-CZf812YP.js → SimplexNoise-CQJvmqd-.js} +2 -4
  155. package/dist/core/{SineWave-CVHPlsdX.js → SineWave-BfOgSGMP.js} +2 -3
  156. package/dist/core/{SliceWipe-4Y_DLO0N.js → SliceWipe-CD_D99sl.js} +1 -2
  157. package/dist/core/{Smoke-CzjvGgBl.js → Smoke-BDQYKRP1.js} +2 -4
  158. package/dist/core/{SmokeFill-DkMjXE-D.js → SmokeFill-CPnzQtQv.js} +3 -8
  159. package/dist/core/{SmokeFlow-DQMNHV2s.js → SmokeFlow-BkPMjZq8.js} +2 -4
  160. package/dist/core/{Solarize-DmhOkKoO.js → Solarize-DSiS32QS.js} +1 -3
  161. package/dist/core/{SolidColor-CyYoqgG3.js → SolidColor-DEKpgy1c.js} +2 -3
  162. package/dist/core/Sparkle-BZur6gPW.js +178 -0
  163. package/dist/core/{Spherize-D2gNetxE.js → Spherize-D9Yg4n6O.js} +2 -3
  164. package/dist/core/{Spiral-BCO6OJXU.js → Spiral-BCacfEpT.js} +2 -3
  165. package/dist/core/{Star-9JERbdHT.js → Star-Dnw1ihk7.js} +1 -2
  166. package/dist/core/{Stone-92McvPwz.js → Stone-Cje-_vAg.js} +1 -3
  167. package/dist/core/{Strands-B6NfRExJ.js → Strands-CFRxS1G_.js} +2 -4
  168. package/dist/core/{Stretch-DbUOkCav.js → Stretch-DXVhfIqO.js} +1 -2
  169. package/dist/core/{Stripes-BG2zbwGV.js → Stripes-CCADWwyq.js} +2 -3
  170. package/dist/core/{StudioBackground-tpZpD080.js → StudioBackground-BlzYNAsu.js} +2 -6
  171. package/dist/core/{SunBurst-BMH4MKRL.js → SunBurst-CmWbI18r.js} +2 -3
  172. package/dist/core/{Surface3D-DUZMTBel.js → Surface3D-Dmh98-0V.js} +2 -6
  173. package/dist/core/{Swirl-CzOPAKx8.js → Swirl-CzI1qSVc.js} +2 -4
  174. package/dist/core/{Teardrop-aOr2VYQI.js → Teardrop-D24uulL0.js} +1 -2
  175. package/dist/core/{Text-CV3Lr3m0.js → Text-CrZKvBw6.js} +2 -6
  176. package/dist/core/{ThinFilm-CYOodpsx.js → ThinFilm-D7R2dt1O.js} +3 -6
  177. package/dist/core/{TiltShift-Cv80ZHW3.js → TiltShift-AMMDZBvf.js} +2 -3
  178. package/dist/core/{TimeTrail-fvJO2a1q.js → TimeTrail-BCYDP2ep.js} +2 -6
  179. package/dist/core/{Tint-D4m85tFF.js → Tint-DHb5wBN5.js} +2 -3
  180. package/dist/core/{Trapezoid-B-PkXCCJ.js → Trapezoid-CL5Fxvq7.js} +1 -2
  181. package/dist/core/{TriangularGrid-hMfK10up.js → TriangularGrid-Bp-SJS-H.js} +2 -3
  182. package/dist/core/{Tritone-n1wNQ1dI.js → Tritone-C0nx7OdC.js} +2 -3
  183. package/dist/core/{Truchet-BhmcbIE9.js → Truchet-DCetyDaq.js} +2 -3
  184. package/dist/core/{Twirl-D8gALHXr.js → Twirl-D_mv9KEi.js} +1 -2
  185. package/dist/core/{VHS-CaqSB2Op.js → VHS-Cp9aDjti.js} +1 -2
  186. package/dist/core/{VenetianBlinds-B1-WjIeY.js → VenetianBlinds-DUyvaT5w.js} +2 -3
  187. package/dist/core/{Vesica-Gh1CMA7n.js → Vesica-BpzrTPTA.js} +1 -2
  188. package/dist/core/{Vibrance-ixBSdj4B.js → Vibrance-DW3J-pvW.js} +1 -3
  189. package/dist/core/{VideoTexture-DVQ1YsW2.js → VideoTexture-zoKsSrex.js} +1 -2
  190. package/dist/core/{Vignette-B9v8l0So.js → Vignette-KKbP3qdZ.js} +2 -5
  191. package/dist/core/{Voronoi-CIHogO9V.js → Voronoi-Bp2-U6lm.js} +2 -5
  192. package/dist/core/Voxels-B3e3LHH5.js +469 -0
  193. package/dist/core/{Water-Dh4UB4UF.js → Water-CoYwvqKx.js} +3 -8
  194. package/dist/core/{Watercolor-C70_K8Lv.js → Watercolor-DUNjSIN1.js} +2 -4
  195. package/dist/core/{WaveDistortion-BCKxUa-p.js → WaveDistortion-Dp8ws0z1.js} +1 -2
  196. package/dist/core/{Waveform-BKMFhH8R.js → Waveform-DDBLB6zu.js} +2 -9
  197. package/dist/core/{WaveletNoise-CFpncHiR.js → WaveletNoise-CpBkzfRT.js} +2 -4
  198. package/dist/core/{Weave-CYgbepeB.js → Weave-cWkvSEAy.js} +2 -3
  199. package/dist/core/{WebcamTexture-B0vkMk_l.js → WebcamTexture-D484SXSE.js} +1 -2
  200. package/dist/core/{Wool-CLkJUMng.js → Wool-C9L7O9fD.js} +1 -3
  201. package/dist/core/{WorleyNoise-BxznxOxV.js → WorleyNoise-B5j5lDQZ.js} +2 -3
  202. package/dist/core/{ZoomBlur-DtujxMsW.js → ZoomBlur-bPC1dBu2.js} +2 -3
  203. package/dist/core/customShaders.d.ts +71 -0
  204. package/dist/core/customShaders.d.ts.map +1 -0
  205. package/dist/core/docs-manifest.json +29177 -0
  206. package/dist/core/gpu/composer.d.ts +2 -0
  207. package/dist/core/gpu/composer.d.ts.map +1 -1
  208. package/dist/core/gpu/contract.d.ts +15 -0
  209. package/dist/core/gpu/contract.d.ts.map +1 -1
  210. package/dist/core/gpu/frame.d.ts +5 -2
  211. package/dist/core/gpu/frame.d.ts.map +1 -1
  212. package/dist/core/gpu/index.d.ts.map +1 -1
  213. package/dist/core/gpu/kit/waves.d.ts +6 -0
  214. package/dist/core/gpu/kit/waves.d.ts.map +1 -1
  215. package/dist/core/gpu/scaffolds/sdfShape.d.ts +1 -1
  216. package/dist/core/gpu/scaffolds/sdfShape.d.ts.map +1 -1
  217. package/dist/core/gpu/support.d.ts +12 -0
  218. package/dist/core/gpu/support.d.ts.map +1 -1
  219. package/dist/core/index.d.ts +3 -2
  220. package/dist/core/index.d.ts.map +1 -1
  221. package/dist/core/index.js +238 -255
  222. package/dist/core/llms.txt +1558 -0
  223. package/dist/core/{noiseColor-_P7nIu_L.js → noiseColor-D_bPhJ4m.js} +2 -2
  224. package/dist/core/presetRenderer.d.ts +4 -0
  225. package/dist/core/presetRenderer.d.ts.map +1 -1
  226. package/dist/core/registry.js +204 -248
  227. package/dist/core/shaderRegistry-BaozBFyh.js +445 -0
  228. package/dist/core/shaderRegistry.d.ts.map +1 -1
  229. package/dist/core/shaders/AngularBlur/index.d.ts +1 -1
  230. package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
  231. package/dist/core/shaders/AngularBlur/index.js +4 -10
  232. package/dist/core/shaders/Arc/index.js +4 -6
  233. package/dist/core/shaders/Ascii/index.d.ts +1 -1
  234. package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
  235. package/dist/core/shaders/Ascii/index.js +4 -11
  236. package/dist/core/shaders/Aurora/index.js +4 -21
  237. package/dist/core/shaders/BarShift/index.js +4 -8
  238. package/dist/core/shaders/BarnDoors/index.js +4 -7
  239. package/dist/core/shaders/Beam/index.js +4 -11
  240. package/dist/core/shaders/Bend/index.js +4 -8
  241. package/dist/core/shaders/Blob/index.js +4 -18
  242. package/dist/core/shaders/BlockDissolve/index.js +4 -7
  243. package/dist/core/shaders/BlockNoise/index.d.ts +1 -1
  244. package/dist/core/shaders/BlockNoise/index.d.ts.map +1 -1
  245. package/dist/core/shaders/BlockNoise/index.js +5 -14
  246. package/dist/core/shaders/BlueNoise/index.d.ts +1 -1
  247. package/dist/core/shaders/BlueNoise/index.d.ts.map +1 -1
  248. package/dist/core/shaders/BlueNoise/index.js +5 -14
  249. package/dist/core/shaders/Blur/index.d.ts +1 -1
  250. package/dist/core/shaders/Blur/index.d.ts.map +1 -1
  251. package/dist/core/shaders/Blur/index.js +4 -10
  252. package/dist/core/shaders/Boids/index.js +4 -9
  253. package/dist/core/shaders/BokehBlur/index.js +4 -10
  254. package/dist/core/shaders/BrickPattern/index.d.ts +1 -1
  255. package/dist/core/shaders/BrickPattern/index.d.ts.map +1 -1
  256. package/dist/core/shaders/BrickPattern/index.js +4 -13
  257. package/dist/core/shaders/BrightnessContrast/index.js +4 -7
  258. package/dist/core/shaders/BrushedMetal/index.js +4 -11
  259. package/dist/core/shaders/Bulge/index.js +4 -8
  260. package/dist/core/shaders/CRTScreen/index.d.ts +2 -2
  261. package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
  262. package/dist/core/shaders/CRTScreen/index.js +4 -10
  263. package/dist/core/shaders/CarbonFiber/index.js +4 -11
  264. package/dist/core/shaders/Chalkboard/index.d.ts +1 -1
  265. package/dist/core/shaders/Chalkboard/index.d.ts.map +1 -1
  266. package/dist/core/shaders/Chalkboard/index.js +4 -9
  267. package/dist/core/shaders/ChannelBlur/index.d.ts +1 -1
  268. package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
  269. package/dist/core/shaders/ChannelBlur/index.js +4 -10
  270. package/dist/core/shaders/CheckerWipe/index.js +4 -7
  271. package/dist/core/shaders/Checkerboard/index.d.ts +1 -1
  272. package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
  273. package/dist/core/shaders/Checkerboard/index.js +4 -13
  274. package/dist/core/shaders/Chevron/index.d.ts +1 -1
  275. package/dist/core/shaders/Chevron/index.d.ts.map +1 -1
  276. package/dist/core/shaders/Chevron/index.js +4 -13
  277. package/dist/core/shaders/ChromaFlow/index.js +4 -8
  278. package/dist/core/shaders/ChromaticAberration/index.js +4 -11
  279. package/dist/core/shaders/Chrome/index.js +4 -10
  280. package/dist/core/shaders/Circle/index.js +4 -6
  281. package/dist/core/shaders/ColorWheel/index.js +4 -11
  282. package/dist/core/shaders/CompressionArtifacts/index.js +4 -7
  283. package/dist/core/shaders/ConcentricSpin/index.js +4 -8
  284. package/dist/core/shaders/ConicGradient/index.js +4 -11
  285. package/dist/core/shaders/ContourLines/index.js +4 -6
  286. package/dist/core/shaders/CornerPin/index.js +4 -8
  287. package/dist/core/shaders/Crescent/index.js +4 -5
  288. package/dist/core/shaders/Cross/index.js +4 -5
  289. package/dist/core/shaders/Crystal/index.js +4 -11
  290. package/dist/core/shaders/CurlNoise/index.d.ts +1 -1
  291. package/dist/core/shaders/CurlNoise/index.d.ts.map +1 -1
  292. package/dist/core/shaders/CurlNoise/index.js +5 -14
  293. package/dist/core/shaders/CursorRipples/index.js +4 -7
  294. package/dist/core/shaders/CursorTrail/index.js +4 -7
  295. package/dist/core/shaders/DataMosh/index.js +4 -7
  296. package/dist/core/shaders/DiamondGradient/index.js +4 -11
  297. package/dist/core/shaders/DiamondWipe/index.js +4 -7
  298. package/dist/core/shaders/DiffuseBlur/index.d.ts +1 -1
  299. package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
  300. package/dist/core/shaders/DiffuseBlur/index.js +4 -10
  301. package/dist/core/shaders/DisplacementMap/index.js +4 -8
  302. package/dist/core/shaders/Dither/index.d.ts +1 -1
  303. package/dist/core/shaders/Dither/index.d.ts.map +1 -1
  304. package/dist/core/shaders/Dither/index.js +4 -13
  305. package/dist/core/shaders/DotGrid/index.d.ts +2 -2
  306. package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
  307. package/dist/core/shaders/DotGrid/index.js +4 -13
  308. package/dist/core/shaders/DropShadow/index.d.ts +1 -1
  309. package/dist/core/shaders/DropShadow/index.d.ts.map +1 -1
  310. package/dist/core/shaders/DropShadow/index.js +4 -10
  311. package/dist/core/shaders/Duotone/index.js +4 -6
  312. package/dist/core/shaders/Ellipse/index.js +4 -5
  313. package/dist/core/shaders/Emboss/index.js +4 -9
  314. package/dist/core/shaders/Engraving/index.js +4 -9
  315. package/dist/core/shaders/ErosionNoise/index.d.ts +1 -1
  316. package/dist/core/shaders/ErosionNoise/index.d.ts.map +1 -1
  317. package/dist/core/shaders/ErosionNoise/index.js +5 -14
  318. package/dist/core/shaders/Exposure/index.js +4 -7
  319. package/dist/core/shaders/FallingLines/index.d.ts +1 -1
  320. package/dist/core/shaders/FallingLines/index.d.ts.map +1 -1
  321. package/dist/core/shaders/FallingLines/index.js +4 -13
  322. package/dist/core/shaders/FilmGrain/index.js +4 -7
  323. package/dist/core/shaders/FilmStock/index.js +4 -13
  324. package/dist/core/shaders/Flip/index.js +4 -8
  325. package/dist/core/shaders/FloatingParticles/index.d.ts +1 -1
  326. package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
  327. package/dist/core/shaders/FloatingParticles/index.js +4 -9
  328. package/dist/core/shaders/FlowField/index.js +4 -8
  329. package/dist/core/shaders/Flower/index.js +4 -5
  330. package/dist/core/shaders/FlowingGradient/index.js +4 -15
  331. package/dist/core/shaders/FlutedGlass/index.js +4 -11
  332. package/dist/core/shaders/Fog/index.js +4 -7
  333. package/dist/core/shaders/Form3D/index.js +4 -7
  334. package/dist/core/shaders/FractalNoise/index.d.ts +1 -1
  335. package/dist/core/shaders/FractalNoise/index.d.ts.map +1 -1
  336. package/dist/core/shaders/FractalNoise/index.js +4 -13
  337. package/dist/core/shaders/Frost/index.js +4 -11
  338. package/dist/core/shaders/GaborNoise/index.d.ts +2 -2
  339. package/dist/core/shaders/GaborNoise/index.d.ts.map +1 -1
  340. package/dist/core/shaders/GaborNoise/index.js +5 -14
  341. package/dist/core/shaders/Glass/index.js +4 -11
  342. package/dist/core/shaders/GlassTiles/index.d.ts +1 -1
  343. package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
  344. package/dist/core/shaders/GlassTiles/index.js +4 -8
  345. package/dist/core/shaders/Glitch/index.d.ts +1 -1
  346. package/dist/core/shaders/Glitch/index.d.ts.map +1 -1
  347. package/dist/core/shaders/Glitch/index.js +4 -10
  348. package/dist/core/shaders/Glow/index.d.ts +1 -1
  349. package/dist/core/shaders/Glow/index.d.ts.map +1 -1
  350. package/dist/core/shaders/Glow/index.js +4 -11
  351. package/dist/core/shaders/Godrays/index.js +4 -12
  352. package/dist/core/shaders/Goo/index.js +4 -11
  353. package/dist/core/shaders/GradientMap/index.js +4 -7
  354. package/dist/core/shaders/Grayscale/index.js +4 -6
  355. package/dist/core/shaders/Grid/index.d.ts +2 -2
  356. package/dist/core/shaders/Grid/index.d.ts.map +1 -1
  357. package/dist/core/shaders/Grid/index.js +4 -13
  358. package/dist/core/shaders/GridDistortion/index.js +4 -11
  359. package/dist/core/shaders/Group/index.js +4 -6
  360. package/dist/core/shaders/HTMLInCanvas/index.js +4 -7
  361. package/dist/core/shaders/Halftone/index.d.ts +1 -1
  362. package/dist/core/shaders/Halftone/index.d.ts.map +1 -1
  363. package/dist/core/shaders/Halftone/index.js +4 -13
  364. package/dist/core/shaders/Heart/index.js +4 -5
  365. package/dist/core/shaders/Heatmap/index.js +4 -11
  366. package/dist/core/shaders/HexGrid/index.d.ts +2 -2
  367. package/dist/core/shaders/HexGrid/index.d.ts.map +1 -1
  368. package/dist/core/shaders/HexGrid/index.js +4 -13
  369. package/dist/core/shaders/Hologram/index.js +4 -10
  370. package/dist/core/shaders/Holographic/index.js +4 -10
  371. package/dist/core/shaders/HueShift/index.js +4 -7
  372. package/dist/core/shaders/ImageTexture/index.js +4 -6
  373. package/dist/core/shaders/InkFlow/index.js +4 -8
  374. package/dist/core/shaders/Invert/index.js +4 -6
  375. package/dist/core/shaders/IrisWipe/index.js +4 -7
  376. package/dist/core/shaders/Irradiance/index.js +4 -13
  377. package/dist/core/shaders/IsometricCubes/index.d.ts +1 -1
  378. package/dist/core/shaders/IsometricCubes/index.d.ts.map +1 -1
  379. package/dist/core/shaders/IsometricCubes/index.js +4 -13
  380. package/dist/core/shaders/Kaleidoscope/index.js +4 -8
  381. package/dist/core/shaders/KeyFrames/index.js +4 -10
  382. package/dist/core/shaders/LensDistortion/index.js +4 -6
  383. package/dist/core/shaders/LensFlare/index.d.ts +1 -1
  384. package/dist/core/shaders/LensFlare/index.d.ts.map +1 -1
  385. package/dist/core/shaders/LensFlare/index.js +4 -12
  386. package/dist/core/shaders/LightEdge/index.js +4 -10
  387. package/dist/core/shaders/LightLeak/index.js +4 -12
  388. package/dist/core/shaders/Line/index.js +4 -10
  389. package/dist/core/shaders/LinearBlur/index.d.ts +1 -1
  390. package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
  391. package/dist/core/shaders/LinearBlur/index.js +4 -10
  392. package/dist/core/shaders/LinearGradient/index.js +4 -11
  393. package/dist/core/shaders/LinearWipe/index.js +4 -7
  394. package/dist/core/shaders/LiquidMetal/index.js +4 -11
  395. package/dist/core/shaders/Liquify/index.js +4 -10
  396. package/dist/core/shaders/MagneticFilings/index.js +4 -9
  397. package/dist/core/shaders/Marble/index.d.ts +1 -1
  398. package/dist/core/shaders/Marble/index.d.ts.map +1 -1
  399. package/dist/core/shaders/Marble/index.js +4 -15
  400. package/dist/core/shaders/MeshGradient/index.js +4 -17
  401. package/dist/core/shaders/Mirror/index.js +4 -8
  402. package/dist/core/shaders/MultiPointGradient/index.js +4 -11
  403. package/dist/core/shaders/Nebula/index.js +4 -13
  404. package/dist/core/shaders/Neon/index.js +4 -9
  405. package/dist/core/shaders/NoiseDissolve/index.js +4 -7
  406. package/dist/core/shaders/ObjectTracker/index.js +4 -10
  407. package/dist/core/shaders/Obsidian/index.js +4 -15
  408. package/dist/core/shaders/PagePeel/index.js +4 -10
  409. package/dist/core/shaders/Paper/index.d.ts +1 -1
  410. package/dist/core/shaders/Paper/index.d.ts.map +1 -1
  411. package/dist/core/shaders/Paper/index.js +4 -8
  412. package/dist/core/shaders/Parallelogram/index.js +4 -5
  413. package/dist/core/shaders/ParticleField/index.js +4 -9
  414. package/dist/core/shaders/ParticleFlow/index.js +4 -10
  415. package/dist/core/shaders/Particles/index.js +4 -9
  416. package/dist/core/shaders/PerlinNoise/index.d.ts +2 -2
  417. package/dist/core/shaders/PerlinNoise/index.d.ts.map +1 -1
  418. package/dist/core/shaders/PerlinNoise/index.js +5 -14
  419. package/dist/core/shaders/Perspective/index.js +4 -8
  420. package/dist/core/shaders/PixelSort/index.js +4 -8
  421. package/dist/core/shaders/PixelThrow/index.js +4 -8
  422. package/dist/core/shaders/Pixelate/index.d.ts +1 -1
  423. package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
  424. package/dist/core/shaders/Pixelate/index.js +4 -10
  425. package/dist/core/shaders/Plasma/index.js +4 -11
  426. package/dist/core/shaders/Plastic/index.js +4 -11
  427. package/dist/core/shaders/PolarCoordinates/index.js +4 -8
  428. package/dist/core/shaders/Polygon/index.js +4 -6
  429. package/dist/core/shaders/Posterize/index.js +4 -6
  430. package/dist/core/shaders/Prism/index.js +4 -12
  431. package/dist/core/shaders/ProgressiveBlur/index.d.ts +1 -1
  432. package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
  433. package/dist/core/shaders/ProgressiveBlur/index.js +4 -10
  434. package/dist/core/shaders/RadialGradient/index.js +4 -11
  435. package/dist/core/shaders/RadialWipe/index.js +4 -7
  436. package/dist/core/shaders/RandomBars/index.js +4 -7
  437. package/dist/core/shaders/ReactionDiffusion/index.js +4 -8
  438. package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
  439. package/dist/core/shaders/ReflectivePlane/index.js +4 -10
  440. package/dist/core/shaders/Repeater/index.js +4 -5
  441. package/dist/core/shaders/Ring/index.js +4 -5
  442. package/dist/core/shaders/RippleWipe/index.js +4 -7
  443. package/dist/core/shaders/Ripples/index.d.ts +1 -1
  444. package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
  445. package/dist/core/shaders/Ripples/index.js +4 -13
  446. package/dist/core/shaders/RoundedRect/index.js +4 -5
  447. package/dist/core/shaders/Saturation/index.js +4 -7
  448. package/dist/core/shaders/Scratches/index.d.ts +1 -1
  449. package/dist/core/shaders/Scratches/index.d.ts.map +1 -1
  450. package/dist/core/shaders/Scratches/index.js +5 -14
  451. package/dist/core/shaders/Sharpness/index.d.ts +1 -1
  452. package/dist/core/shaders/Sharpness/index.d.ts.map +1 -1
  453. package/dist/core/shaders/Sharpness/index.js +4 -11
  454. package/dist/core/shaders/Shatter/index.js +4 -6
  455. package/dist/core/shaders/SimplexNoise/index.d.ts +1 -1
  456. package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
  457. package/dist/core/shaders/SimplexNoise/index.js +5 -14
  458. package/dist/core/shaders/SineWave/index.js +4 -10
  459. package/dist/core/shaders/SliceWipe/index.js +4 -8
  460. package/dist/core/shaders/Smoke/index.js +4 -7
  461. package/dist/core/shaders/SmokeFill/index.js +4 -10
  462. package/dist/core/shaders/SmokeFlow/index.js +4 -7
  463. package/dist/core/shaders/Solarize/index.js +4 -7
  464. package/dist/core/shaders/SolidColor/index.js +4 -11
  465. package/dist/core/shaders/Sparkle/index.d.ts +57 -0
  466. package/dist/core/shaders/Sparkle/index.d.ts.map +1 -0
  467. package/dist/core/shaders/Sparkle/index.js +5 -0
  468. package/dist/core/shaders/Spherize/index.d.ts +1 -1
  469. package/dist/core/shaders/Spherize/index.d.ts.map +1 -1
  470. package/dist/core/shaders/Spherize/index.js +4 -10
  471. package/dist/core/shaders/Spiral/index.js +4 -11
  472. package/dist/core/shaders/Star/index.js +4 -5
  473. package/dist/core/shaders/Stone/index.d.ts +1 -1
  474. package/dist/core/shaders/Stone/index.d.ts.map +1 -1
  475. package/dist/core/shaders/Stone/index.js +4 -14
  476. package/dist/core/shaders/Strands/index.d.ts +1 -1
  477. package/dist/core/shaders/Strands/index.d.ts.map +1 -1
  478. package/dist/core/shaders/Strands/index.js +4 -13
  479. package/dist/core/shaders/Stretch/index.js +4 -8
  480. package/dist/core/shaders/Stripes/index.d.ts +1 -1
  481. package/dist/core/shaders/Stripes/index.d.ts.map +1 -1
  482. package/dist/core/shaders/Stripes/index.js +4 -13
  483. package/dist/core/shaders/StudioBackground/index.js +4 -14
  484. package/dist/core/shaders/SunBurst/index.js +4 -12
  485. package/dist/core/shaders/Surface3D/index.js +4 -8
  486. package/dist/core/shaders/Swirl/index.js +4 -11
  487. package/dist/core/shaders/Teardrop/index.js +4 -5
  488. package/dist/core/shaders/Text/index.js +4 -12
  489. package/dist/core/shaders/ThinFilm/index.js +4 -9
  490. package/dist/core/shaders/TiltShift/index.d.ts +1 -1
  491. package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
  492. package/dist/core/shaders/TiltShift/index.js +4 -10
  493. package/dist/core/shaders/TimeTrail/index.js +4 -8
  494. package/dist/core/shaders/Tint/index.js +4 -6
  495. package/dist/core/shaders/Trapezoid/index.js +4 -5
  496. package/dist/core/shaders/TriangularGrid/index.d.ts +1 -1
  497. package/dist/core/shaders/TriangularGrid/index.d.ts.map +1 -1
  498. package/dist/core/shaders/TriangularGrid/index.js +4 -13
  499. package/dist/core/shaders/Tritone/index.js +4 -6
  500. package/dist/core/shaders/Truchet/index.d.ts +1 -1
  501. package/dist/core/shaders/Truchet/index.d.ts.map +1 -1
  502. package/dist/core/shaders/Truchet/index.js +4 -13
  503. package/dist/core/shaders/Twirl/index.js +4 -8
  504. package/dist/core/shaders/VHS/index.d.ts +1 -1
  505. package/dist/core/shaders/VHS/index.d.ts.map +1 -1
  506. package/dist/core/shaders/VHS/index.js +4 -10
  507. package/dist/core/shaders/VenetianBlinds/index.js +4 -7
  508. package/dist/core/shaders/Vesica/index.js +4 -5
  509. package/dist/core/shaders/Vibrance/index.js +4 -7
  510. package/dist/core/shaders/VideoTexture/index.js +4 -6
  511. package/dist/core/shaders/Vignette/index.js +4 -8
  512. package/dist/core/shaders/Voronoi/index.d.ts +1 -1
  513. package/dist/core/shaders/Voronoi/index.d.ts.map +1 -1
  514. package/dist/core/shaders/Voronoi/index.js +4 -13
  515. package/dist/core/shaders/Voxels/index.js +4 -14
  516. package/dist/core/shaders/Water/index.js +4 -11
  517. package/dist/core/shaders/Watercolor/index.d.ts +1 -1
  518. package/dist/core/shaders/Watercolor/index.d.ts.map +1 -1
  519. package/dist/core/shaders/Watercolor/index.js +4 -10
  520. package/dist/core/shaders/WaveDistortion/index.js +4 -8
  521. package/dist/core/shaders/Waveform/index.js +4 -16
  522. package/dist/core/shaders/WaveletNoise/index.d.ts +1 -1
  523. package/dist/core/shaders/WaveletNoise/index.d.ts.map +1 -1
  524. package/dist/core/shaders/WaveletNoise/index.js +5 -14
  525. package/dist/core/shaders/Weave/index.d.ts +1 -1
  526. package/dist/core/shaders/Weave/index.d.ts.map +1 -1
  527. package/dist/core/shaders/Weave/index.js +4 -13
  528. package/dist/core/shaders/WebcamTexture/index.js +4 -6
  529. package/dist/core/shaders/Wool/index.d.ts +1 -1
  530. package/dist/core/shaders/Wool/index.d.ts.map +1 -1
  531. package/dist/core/shaders/Wool/index.js +4 -14
  532. package/dist/core/shaders/WorleyNoise/index.d.ts +1 -1
  533. package/dist/core/shaders/WorleyNoise/index.d.ts.map +1 -1
  534. package/dist/core/shaders/WorleyNoise/index.js +4 -13
  535. package/dist/core/shaders/ZoomBlur/index.d.ts +1 -1
  536. package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
  537. package/dist/core/shaders/ZoomBlur/index.js +4 -10
  538. package/dist/core/std/effects/blurs.d.ts +656 -138
  539. package/dist/core/std/effects/blurs.d.ts.map +1 -1
  540. package/dist/core/std/effects/color.d.ts +209 -32
  541. package/dist/core/std/effects/color.d.ts.map +1 -1
  542. package/dist/core/std/effects/edgeGlow.d.ts +86 -17
  543. package/dist/core/std/effects/edgeGlow.d.ts.map +1 -1
  544. package/dist/core/std/effects/fracture.d.ts +72 -8
  545. package/dist/core/std/effects/fracture.d.ts.map +1 -1
  546. package/dist/core/std/effects/index.d.ts +15 -0
  547. package/dist/core/std/effects/index.d.ts.map +1 -0
  548. package/dist/core/std/effects/instances.d.ts +87 -8
  549. package/dist/core/std/effects/instances.d.ts.map +1 -1
  550. package/dist/core/std/effects/lens.d.ts +48 -12
  551. package/dist/core/std/effects/lens.d.ts.map +1 -1
  552. package/dist/core/std/effects/overlay.d.ts +63 -22
  553. package/dist/core/std/effects/overlay.d.ts.map +1 -1
  554. package/dist/core/std/effects/pointerFields.d.ts +45 -20
  555. package/dist/core/std/effects/pointerFields.d.ts.map +1 -1
  556. package/dist/core/std/effects/reveal.d.ts +118 -40
  557. package/dist/core/std/effects/reveal.d.ts.map +1 -1
  558. package/dist/core/std/effects/stylize.d.ts +139 -70
  559. package/dist/core/std/effects/stylize.d.ts.map +1 -1
  560. package/dist/core/std/filter.d.ts +72 -12
  561. package/dist/core/std/filter.d.ts.map +1 -1
  562. package/dist/core/std/frames.d.ts +91 -24
  563. package/dist/core/std/frames.d.ts.map +1 -1
  564. package/dist/core/std/index.d.ts +46 -8
  565. package/dist/core/std/index.d.ts.map +1 -1
  566. package/dist/core/std/index.js +4 -0
  567. package/dist/core/std/invoke.d.ts +107 -12
  568. package/dist/core/std/invoke.d.ts.map +1 -1
  569. package/dist/core/std/lists.d.ts +40 -10
  570. package/dist/core/std/lists.d.ts.map +1 -1
  571. package/dist/core/std/lower.d.ts +73 -1
  572. package/dist/core/std/lower.d.ts.map +1 -1
  573. package/dist/core/std/mask.d.ts +60 -17
  574. package/dist/core/std/mask.d.ts.map +1 -1
  575. package/dist/core/std/math.d.ts +484 -9
  576. package/dist/core/std/math.d.ts.map +1 -1
  577. package/dist/core/std/motion.d.ts +130 -10
  578. package/dist/core/std/motion.d.ts.map +1 -1
  579. package/dist/core/std/paint/compose.d.ts +57 -16
  580. package/dist/core/std/paint/compose.d.ts.map +1 -1
  581. package/dist/core/std/paint/fields.d.ts +376 -93
  582. package/dist/core/std/paint/fields.d.ts.map +1 -1
  583. package/dist/core/std/paint/figures.d.ts +32 -17
  584. package/dist/core/std/paint/figures.d.ts.map +1 -1
  585. package/dist/core/std/paint/gradients.d.ts +58 -25
  586. package/dist/core/std/paint/gradients.d.ts.map +1 -1
  587. package/dist/core/std/paint/light.d.ts +501 -77
  588. package/dist/core/std/paint/light.d.ts.map +1 -1
  589. package/dist/core/std/paint/materials.d.ts +678 -151
  590. package/dist/core/std/paint/materials.d.ts.map +1 -1
  591. package/dist/core/std/paint/media.d.ts +47 -32
  592. package/dist/core/std/paint/media.d.ts.map +1 -1
  593. package/dist/core/std/paint/noise.d.ts +436 -87
  594. package/dist/core/std/paint/noise.d.ts.map +1 -1
  595. package/dist/core/std/paint/patterns.d.ts +473 -91
  596. package/dist/core/std/paint/patterns.d.ts.map +1 -1
  597. package/dist/core/std/paint/radiance.d.ts +75 -29
  598. package/dist/core/std/paint/radiance.d.ts.map +1 -1
  599. package/dist/core/std/paint/volume.d.ts +68 -27
  600. package/dist/core/std/paint/volume.d.ts.map +1 -1
  601. package/dist/core/std/paint/voxels.d.ts +46 -26
  602. package/dist/core/std/paint/voxels.d.ts.map +1 -1
  603. package/dist/core/std/shape.d.ts +195 -1
  604. package/dist/core/std/shape.d.ts.map +1 -1
  605. package/dist/core/std/signal.d.ts +55 -15
  606. package/dist/core/std/signal.d.ts.map +1 -1
  607. package/dist/core/std/sim/agentForces.d.ts +441 -99
  608. package/dist/core/std/sim/agentForces.d.ts.map +1 -1
  609. package/dist/core/std/sim/agentFrame.d.ts +94 -20
  610. package/dist/core/std/sim/agentFrame.d.ts.map +1 -1
  611. package/dist/core/std/sim/agentRender.d.ts +187 -60
  612. package/dist/core/std/sim/agentRender.d.ts.map +1 -1
  613. package/dist/core/std/sim/agents.d.ts +99 -28
  614. package/dist/core/std/sim/agents.d.ts.map +1 -1
  615. package/dist/core/std/sim/feedback.d.ts +40 -19
  616. package/dist/core/std/sim/feedback.d.ts.map +1 -1
  617. package/dist/core/std/sim/fluids.d.ts +127 -63
  618. package/dist/core/std/sim/fluids.d.ts.map +1 -1
  619. package/dist/core/std/sim/grids.d.ts +200 -48
  620. package/dist/core/std/sim/grids.d.ts.map +1 -1
  621. package/dist/core/std/sim/index.d.ts +14 -0
  622. package/dist/core/std/sim/index.d.ts.map +1 -0
  623. package/dist/core/std/sim/shapeFields.d.ts +56 -0
  624. package/dist/core/std/sim/shapeFields.d.ts.map +1 -1
  625. package/dist/core/std/sim.d.ts +112 -10
  626. package/dist/core/std/sim.d.ts.map +1 -1
  627. package/dist/core/std/slots.d.ts +72 -6
  628. package/dist/core/std/slots.d.ts.map +1 -1
  629. package/dist/core/std/types.d.ts +97 -60
  630. package/dist/core/std/types.d.ts.map +1 -1
  631. package/dist/core/std/values.d.ts +33 -14
  632. package/dist/core/std/values.d.ts.map +1 -1
  633. package/dist/core/std/warps.d.ts +221 -76
  634. package/dist/core/std/warps.d.ts.map +1 -1
  635. package/dist/core/std/wgsl.d.ts +115 -0
  636. package/dist/core/std/wgsl.d.ts.map +1 -0
  637. package/dist/core/std-ClftfWpF.js +218889 -0
  638. package/dist/core/{support-GJphyuEe.js → support-D3W86vgR.js} +11 -1
  639. package/dist/core/telemetry/index.js +1 -1
  640. package/dist/core/utilities/transformations/index.js +1 -1
  641. package/dist/js/bundle.js +182 -180
  642. package/dist/js/createShader.d.ts.map +1 -1
  643. package/dist/js/createShader.js +4 -3
  644. package/dist/js/types.d.ts +5 -0
  645. package/dist/js/types.d.ts.map +1 -1
  646. package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
  647. package/dist/js/utils/generatePresetCode.js +35 -22
  648. package/dist/react/CustomShader.js +178 -0
  649. package/dist/react/Preview.js +1 -0
  650. package/dist/react/Shader.js +1 -1
  651. package/dist/react/Sparkle.js +226 -0
  652. package/dist/react/bundle.js +178 -176
  653. package/dist/react/components/Sparkle.d.ts +41 -0
  654. package/dist/react/components/Sparkle.d.ts.map +1 -0
  655. package/dist/react/engine/CustomShader.d.ts +37 -0
  656. package/dist/react/engine/CustomShader.d.ts.map +1 -0
  657. package/dist/react/engine/Preview.d.ts.map +1 -1
  658. package/dist/react/index.d.ts +5 -0
  659. package/dist/react/index.d.ts.map +1 -1
  660. package/dist/react/index.js +4 -2
  661. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  662. package/dist/react/utils/generatePresetCode.js +35 -22
  663. package/dist/registry.js +310 -58
  664. package/dist/solid/components/Sparkle.d.ts +38 -0
  665. package/dist/solid/components/Sparkle.d.ts.map +1 -0
  666. package/dist/solid/components/Sparkle.js +232 -0
  667. package/dist/solid/engine/CustomShader.d.ts +35 -0
  668. package/dist/solid/engine/CustomShader.d.ts.map +1 -0
  669. package/dist/solid/engine/CustomShader.js +160 -0
  670. package/dist/solid/engine/Preview.d.ts.map +1 -1
  671. package/dist/solid/engine/Preview.js +319 -317
  672. package/dist/solid/engine/Shader.js +1 -1
  673. package/dist/solid/index.d.ts +5 -0
  674. package/dist/solid/index.d.ts.map +1 -1
  675. package/dist/solid/index.js +95 -86
  676. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  677. package/dist/solid/utils/generatePresetCode.js +35 -22
  678. package/dist/svelte/components/Sparkle.svelte.d.ts +28 -0
  679. package/dist/svelte/engine/CustomShader.svelte.d.ts +40 -0
  680. package/dist/svelte/index.d.ts +4 -0
  681. package/dist/svelte/index.js +1237 -877
  682. package/dist/svelte/source/components/Sparkle.svelte +352 -0
  683. package/dist/svelte/source/engine/CustomShader.svelte +216 -0
  684. package/dist/svelte/source/engine/Preview.svelte +5 -3
  685. package/dist/svelte/source/index.js +4 -0
  686. package/dist/svelte/utils/generatePresetCode.js +35 -22
  687. package/dist/vue/CustomShader.js +3 -0
  688. package/dist/vue/CustomShader.vue_vue_type_script_setup_true_lang.js +173 -0
  689. package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +2 -0
  690. package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
  691. package/dist/vue/Sparkle.js +3 -0
  692. package/dist/vue/Sparkle.vue_vue_type_script_setup_true_lang.js +233 -0
  693. package/dist/vue/components/Sparkle.vue.d.ts +63 -0
  694. package/dist/vue/components/Sparkle.vue.d.ts.map +1 -0
  695. package/dist/vue/index.d.ts +4 -0
  696. package/dist/vue/index.d.ts.map +1 -1
  697. package/dist/vue/index.js +4 -2
  698. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  699. package/dist/vue/utils/generatePresetCode.js +35 -22
  700. package/package.json +27 -2
  701. package/dist/core/Irradiance-DtC4tqNu.js +0 -4191
  702. package/dist/core/LightEdge-BV9bO8YB.js +0 -2339
  703. package/dist/core/Repeater-DU_EhoxD.js +0 -762
  704. package/dist/core/Shatter-DYKKCVD8.js +0 -1479
  705. package/dist/core/Voxels-LEG0c9YC.js +0 -8547
  706. package/dist/core/agents-CdLlm-5E.js +0 -5357
  707. package/dist/core/agents-DZaZ4n9_.js +0 -15709
  708. package/dist/core/blur-CrEChFnm.js +0 -8015
  709. package/dist/core/blurs-D5a6ad3o.js +0 -1751
  710. package/dist/core/canvasRaster-DDBkrdY8.js +0 -80
  711. package/dist/core/color-CY5teMWa.js +0 -3619
  712. package/dist/core/compose-DNU_Ut36.js +0 -46
  713. package/dist/core/device-m0ud8-Fn.js +0 -10
  714. package/dist/core/feedback-yfT0pT6A.js +0 -46
  715. package/dist/core/fields-CXwmEUsd.js +0 -475
  716. package/dist/core/figures-BRYcB-p2.js +0 -48
  717. package/dist/core/filter-BrhpSs3Z.js +0 -23
  718. package/dist/core/fluids-CBhAiGAx.js +0 -226
  719. package/dist/core/fonts-BUXTd9qb.js +0 -59
  720. package/dist/core/frames-Clw8-BpA.js +0 -78
  721. package/dist/core/glass-DIEus1UY.js +0 -2532
  722. package/dist/core/gradientPaints-Cx2bT20T.js +0 -6564
  723. package/dist/core/gradients-C15o7_xy.js +0 -159
  724. package/dist/core/grids-Cv99xcJg.js +0 -151
  725. package/dist/core/lens-ChO_HVpe.js +0 -352
  726. package/dist/core/light-Bba_Pie_.js +0 -271
  727. package/dist/core/lightfields-D120ZvMt.js +0 -2255
  728. package/dist/core/lower-DtoDQ7hV.js +0 -49452
  729. package/dist/core/mask-6rnSCir2.js +0 -28
  730. package/dist/core/materials-BjsiWqS0.js +0 -2944
  731. package/dist/core/math-7PlusTFx.js +0 -56
  732. package/dist/core/media-CgWmWvGq.js +0 -832
  733. package/dist/core/mediaLifecycle-BTPb5i1-.js +0 -320
  734. package/dist/core/motionBlur-DzaHMq9p.js +0 -6766
  735. package/dist/core/noise-G7a5U0ar.js +0 -546
  736. package/dist/core/noisePaints-B_axPpuv.js +0 -3619
  737. package/dist/core/noiseStylize-CUrW_HiC.js +0 -65
  738. package/dist/core/overlay-W4DAsSzP.js +0 -4712
  739. package/dist/core/patterns-RTt6Fek8.js +0 -9723
  740. package/dist/core/pointerFields-Ch_-cbCV.js +0 -2339
  741. package/dist/core/porters-CQwDd2t4.js +0 -30201
  742. package/dist/core/reveal-dbBiS7gE.js +0 -1688
  743. package/dist/core/sdf3d-BMqCSSPB.js +0 -21082
  744. package/dist/core/shaderRegistry-Bs0XOv9A.js +0 -443
  745. package/dist/core/shape-B2CoDi6l.js +0 -20
  746. package/dist/core/shapePaints-7HrXeLYX.js +0 -3354
  747. package/dist/core/signal-emJuvOI3.js +0 -34
  748. package/dist/core/slots-BqIef2iV.js +0 -32
  749. package/dist/core/stylize-CiN0ZaMu.js +0 -4541
  750. package/dist/core/tone-CsRho9qb.js +0 -763
  751. package/dist/core/warpMaps-Dbuleg2M.js +0 -10773
  752. package/dist/core/warps-gIr3RmZV.js +0 -276
  753. /package/dist/core/{transformations-CzFmhZww.js → transformations-P50Uo_Ju.js} +0 -0
@@ -2,77 +2,95 @@ import { GpuComputeNode, GpuFragmentParams, KitTexture, Expr } from '../../gpu/c
2
2
  import { DirectionFrame } from '../frames';
3
3
 
4
4
  /**
5
- * Evaluate `inner` only where `cond` holds; elsewhere the (cheap) `fallback`. Emits
6
- * `var x = fallback; if (cond) { …inner hoists…; x = inner; }`. Values hoisted BEFORE the guard
7
- * (emitted by `cond`/`fallback`, or by earlier expressions) stay in the enclosing scope and remain
8
- * visible inside; values first used inside are declared inside and must not be re-read outside.
9
- * A `local()` shared between the guarded interior and any later expression MUST be listed in
10
- * `deps` — that emits it in the enclosing scope first (a hoist whose first use is inside the
11
- * branch would otherwise be block-scoped and unreachable afterwards).
5
+ * Evaluates an expression only where a condition holds, and a cheap fallback everywhere else.
6
+ *
7
+ * Use it to skip a material's whole body for pixels outside the shape. Any value you build
8
+ * inside `inner` and also read after the guard must be listed in `deps`.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * return guarded(insideShape(field.sdf, field.pxH), vec4(rgb, silhouette(field, u.edgeSoftness)), vec4(0, 0, 0, 0), 'plastic')
13
+ * ```
14
+ * @tip Values first made inside the guard are not visible after it. Put shared locals in `deps`.
15
+ * @see insideShape, silhouette
12
16
  */
13
17
  export declare function guarded(cond: Expr, inner: Expr, fallback: Expr, hint?: string, deps?: Expr[]): Expr;
14
18
  export { reflect, refract, exp2 } from '../math';
15
- /** The material-body early-exit condition as vocabulary: NOT outside the shape by > 2 device
16
- * pixels (the exact complement of the kit's `outsideShape` early-exit test). */
19
+ /**
20
+ * True inside the shape and up to two pixels outside it.
21
+ *
22
+ * Pass the signed distance and pixel size from `surfaceField`. The two-pixel margin keeps the
23
+ * anti-aliased edge inside the shaded region. The usual condition for `guarded`.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * guarded(insideShape(field.sdf, field.pxH), shaded, vec4(0, 0, 0, 0))
28
+ * ```
29
+ * @see guarded, silhouette
30
+ */
17
31
  export declare function insideShape(sdf: Expr, pxH: Expr): Expr;
18
- /** The resolved per-fragment frame the `surface:` slot shades. */
32
+ /**
33
+ * What `shapedSurface` hands your `surface` function: the shape's distance field, sampled and
34
+ * ready to shade.
35
+ *
36
+ * Read the taps through `surfaceField` rather than directly. `volumetric` tells you at build
37
+ * time whether the shape is a 3D one (a sphere, a cube, an extruded SVG) or a flat one.
38
+ */
19
39
  export interface SurfaceFrame {
20
- /** Placement-space UV (`sdfSpaceUV` over center/scale/rotation) — undefined for `stencil: 'none'`. */
40
+ /** Placement coordinates: the shape's own 0–1 square after center, scale and rotation. Absent with `stencil: 'none'`. */
21
41
  sdfUV?: Expr;
22
- /** Centre field tap (`.x` sdf/−chord, `.y/.z` pattern coords or baked gradients, `.w` depth). */
42
+ /** The field at this pixel. `.x` is the signed distance (negative inside), `.y/.z` pattern coordinates, `.w` depth. */
23
43
  surf0?: Expr;
24
- /** Forward/central stencil neighbour taps (per the declared `stencil`). */
44
+ /** The field one step right and one step down, when the stencil took them. */
25
45
  surfX?: Expr;
26
46
  surfY?: Expr;
27
- /** Central-stencil extras (−eps taps); only with `stencil: {kind: 'central'}`. */
47
+ /** The field one step left and one step up. Only with `stencil: {kind: 'central'}`. */
28
48
  surfL?: Expr;
29
49
  surfD?: Expr;
30
- /** Centre-quality field sampler (materials with `stencil: 'none'` take their own taps). */
50
+ /** Sample the field at any placement coordinate, at full quality. */
31
51
  sampler: (uv: Expr) => Expr;
32
- /** Neighbour-tap sampler (cheap bilinear on the volumetric path unless `gradSampler: 'same'`). */
52
+ /** Sample the field at any placement coordinate, cheaply. Use it for neighbour taps. */
33
53
  gradSampler: (uv: Expr) => Expr;
34
- /** Unfiltered nearest-texel tap — for discrete payload a pre-march packs into the field
35
- * (the voxel G-buffer's face/cell channels). Aliases `sampler` on the flat paths. */
54
+ /** Sample one texel without filtering, for discrete data packed into the field. */
36
55
  texelSampler: (uv: Expr) => Expr;
37
- /** Build-time: the active shape resolved to the compute-marched volumetric path. */
56
+ /** True when the shape is 3D or extruded. Known at build time, so you can branch in TypeScript. */
38
57
  volumetric: boolean;
39
- /** `volumetric` as the runtime 0/1 f32 the composite bodies `std.select` on. */
58
+ /** `volumetric` as a 0/1 number, for use inside an expression. */
40
59
  volFlag: Expr;
41
- /** Build-time: the sampler carries analytic/baked gradients in `.g/.b` (skip FD taps). */
60
+ /** True when `.y/.z` already hold the field's gradients instead of pattern coordinates. Skip your own slope taps. */
42
61
  bakedGradients: boolean;
43
- /** Child RTT (with `child: 'required'`) — compute-created when a consumer prepass made one. */
62
+ /** The layer inside, as a texture. Present with `child: 'required'`. */
44
63
  childTexture?: KitTexture;
45
64
  }
65
+ /** The options `shapedSurface` takes. Only `surface` is required. */
46
66
  export interface ShapedSurfaceSpec {
47
- /** Surface-pattern coords the volumetric pre-march bakes into `.g/.b` (default 'none'). */
67
+ /** Bake surface coordinates for 3D shapes so a pattern sticks to them (default 'none'). 'raw' follows the surface without seams, 'triplanar' projects from three sides. */
48
68
  pattern?: 'none' | 'raw' | 'triplanar';
49
- /** Chord measure along the march ray (default 'span'; 'firstLobe' = front-wall thickness). */
69
+ /** How thickness is measured through a 3D shape (default 'span'). 'firstLobe' measures the front wall only. */
50
70
  chord?: 'span' | 'firstLobe';
51
- /** Neighbour-tap sampler quality (default 'fast'; 'same' = centre sampler everywhere). */
71
+ /** Quality of the neighbour taps (default 'fast'). 'same' uses the full-quality sampler for them too. */
52
72
  gradSampler?: 'fast' | 'same';
53
- /** Baked-gradient routing (default 'none'); see `ShapeFieldSamplerOptions`. */
73
+ /** Let the field carry its own gradients in `.y/.z` (default 'none'). Check `frame.bakedGradients` before taking slopes. */
54
74
  bakedGradients?: 'none' | 'volumetric' | 'all';
55
- /** The field-tap frame to resolve for the material (default forward stencil at eps 0.01). */
75
+ /** Which taps to take for you (default a right-and-down pair, `eps` 0.01 in placement units). 'none' takes none, 'centre' this pixel only, 'central' adds left and up. */
56
76
  stencil?: 'none' | 'centre' | {
57
77
  kind: 'forward' | 'central';
58
78
  eps: number;
59
79
  };
60
80
  /**
61
- * Which sampler takes the CENTRE tap (default 'quality' — bicubic on the volumetric path).
62
- * 'fast' takes the cheap bilinear neighbour sampler instead: for a material whose open-canvas
63
- * pixels only gate on the centre value (coverage, an outside branch) and that takes its own
64
- * quality tap inside the branches that need one — the metals' bicubic-per-pixel is 16 texel
65
- * loads at every canvas pixel on a 3D shape.
81
+ * Which sampler takes the centre tap (default 'quality'). 'fast' is cheaper on 3D shapes
82
+ * when the centre tap only gates coverage and the material takes its own quality tap
83
+ * where it needs one.
66
84
  */
67
85
  centreTap?: 'quality' | 'fast';
68
- /** Displace the screen UV before placement (returns the UV fed to `sdfSpaceUV`). */
86
+ /** Displace the canvas uv before placement, to wobble or warp the whole shape. */
69
87
  placeUV?: (params: GpuFragmentParams) => Expr;
70
- /** Resolve the child RTT into the frame; without a child the fragment returns transparent. */
88
+ /** Require the layer inside and expose it as `frame.childTexture`. Without a child the effect draws nothing. */
71
89
  child?: 'required';
72
- /** THE MATERIAL: shade the resolved frame. */
90
+ /** Your material: shade the frame and return the color at this pixel. */
73
91
  surface: (frame: SurfaceFrame, params: GpuFragmentParams) => Expr;
74
92
  }
75
- /** The three definition halves the spine contributes — spread into the definition. */
93
+ /** The three fields `shapedSurface` returns. Spread them into your definition. */
76
94
  export interface ShapedSurfaceEffect {
77
95
  extraFields: Record<string, {
78
96
  schema: import('typegpu/data').AnyWgslData;
@@ -83,27 +101,75 @@ export interface ShapedSurfaceEffect {
83
101
  fragment: (params: GpuFragmentParams) => Expr;
84
102
  };
85
103
  }
86
- /** The shape-effect spine noun. See the module header. */
104
+ /**
105
+ * Turns a shape prop into a surface your material shades.
106
+ *
107
+ * Spread the result into a definition that declares the `center`, `scale`, `rotation` and
108
+ * `shape` props (copy them from any shape effect). Your `surface` function receives a
109
+ * `SurfaceFrame` and returns the color at this pixel. Flat shapes, SVG shapes and 3D shapes
110
+ * all arrive through the same frame.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * ...shapedSurface({
115
+ * pattern: 'raw',
116
+ * surface: (frame, params) => {
117
+ * const u = params.uniforms
118
+ * const field = surfaceField(frame, params, {scale: u.scale})
119
+ * const n = geometricNormal(frame, field, {bevelWidth: u.bevelWidth, bevelShape: u.bevelShape})
120
+ * const key = keyLightAt(direction(u.lightAngle), -0.7)
121
+ * const rgb = mul(u.color.member('rgb'), lambert(n, key.member('L'), {wrap: 0.3}))
122
+ * return guarded(insideShape(field.sdf, field.pxH), vec4(rgb, silhouette(field, u.edgeSoftness)), vec4(0, 0, 0, 0))
123
+ * },
124
+ * }),
125
+ * ```
126
+ * @tip Start from `surfaceField`, end with `guarded` around `insideShape`. Everything between is the look.
127
+ * @see surfaceField, geometricNormal, silhouette, guarded
128
+ */
87
129
  export declare function shapedSurface(spec: ShapedSurfaceSpec): ShapedSurfaceEffect;
130
+ /** The field values a material reads, bound once: the taps, the signed distance and the pixel size. */
88
131
  export interface SurfaceField {
89
- /** Centre / forward-x / forward-y field taps, locals-bound. */
132
+ /** The field at this pixel, and one step right and one step down when the stencil took them. */
90
133
  s0: Expr;
91
134
  sX?: Expr;
92
135
  sY?: Expr;
93
- /** Signed distance (centre tap `.x`, divided by `scale` when given). */
136
+ /** Signed distance to the shape's edge: negative inside, zero on the edge. */
94
137
  sdf: Expr;
95
- /** One pixel in UV height units. */
138
+ /** One pixel, as a fraction of the canvas height. */
96
139
  pxH: Expr;
97
- /** Viewport aspect (width / height). */
140
+ /** Canvas width divided by height. */
98
141
  aspect: Expr;
99
142
  }
100
- /** The opening block of every material: bind the field taps + sdf + pixel size to locals. */
143
+ /**
144
+ * The first line of a material: the field taps, the signed distance and the pixel size, bound once.
145
+ *
146
+ * Pass `scale` (the shape's scale prop) to divide the distance by it, as the library's metals
147
+ * and plastics do, so edge softness and pixel tests track the shape's size. Leave it out for
148
+ * `continuedField`.
149
+ *
150
+ * @example
151
+ * ```ts
152
+ * const field = surfaceField(frame, params, {scale: params.uniforms.scale})
153
+ * ```
154
+ * @see shapedSurface, geometricNormal, silhouette, insideShape
155
+ */
101
156
  export declare function surfaceField(frame: SurfaceFrame, params: GpuFragmentParams, opts?: {
102
157
  scale?: Expr;
103
158
  }): SurfaceField;
104
159
  /**
105
- * The geometric surface normal, resolved at build time: marched volumetric shapes take the
106
- * field-tap normal; flat shapes take the gradient normal tilted by the bevel profile.
160
+ * The surface normal of the shape, whichever kind of shape is active.
161
+ *
162
+ * A 3D shape takes its normal from the marched depth. A flat shape takes a normal that tilts
163
+ * away from the face near the edge, over `bevelWidth` (in the units of `field.sdf`) with the
164
+ * profile `bevelShape` (0 round, 1 machined). `sharpness` clamps the 3D slope (default 5, lower
165
+ * is calmer). `eps` must match the stencil step (default 0.01). Needs a stencil with neighbour taps.
166
+ *
167
+ * @example
168
+ * ```ts
169
+ * const n = geometricNormal(frame, field, {bevelWidth: u.bevelWidth, bevelShape: u.bevelShape})
170
+ * ```
171
+ * @tip Add relief with `nudgeNormal` or `tiltNormal` after this, never before.
172
+ * @see marchedNormal, nudgeNormal, tiltNormal, fieldSlope
107
173
  */
108
174
  export declare function geometricNormal(frame: SurfaceFrame, field: SurfaceField, opts: {
109
175
  bevelWidth: Expr;
@@ -112,24 +178,92 @@ export declare function geometricNormal(frame: SurfaceFrame, field: SurfaceField
112
178
  eps?: number;
113
179
  hint?: string;
114
180
  }): Expr;
115
- /** Surface-pattern coordinates (the coords a pattern rides the geometry in), locals-bound. */
181
+ /**
182
+ * Coordinates for a pattern that sticks to the shape's surface.
183
+ *
184
+ * On a flat shape they are the placement coordinates centred on the shape (0,0 at its centre).
185
+ * On a 3D shape they follow the surface as it rotates, when the effect declares
186
+ * `pattern: 'raw'` or `'triplanar'`.
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const pat = surfacePattern(frame, field)
191
+ * ```
192
+ * @see shapedSurface, rotationSensor, surfaceNoiseAt
193
+ */
116
194
  export declare function surfacePattern(frame: SurfaceFrame, field: SurfaceField, opts?: {
117
195
  uv?: Expr;
118
196
  }): Expr;
119
- /** The in-plane field gradient (the outward direction a flat shape's shading rides). */
197
+ /**
198
+ * The direction the shape's distance grows in: a 2D vector pointing outward at this pixel.
199
+ *
200
+ * Its length is about 1 on a flat shape. `eps` is the tap step (default 0.01) and must match
201
+ * the stencil step.
202
+ *
203
+ * @example
204
+ * ```ts
205
+ * const grad = fieldSlope(field)
206
+ * ```
207
+ * @see nearestEdge, geometricNormal, tiltAlong
208
+ */
120
209
  export declare function fieldSlope(field: SurfaceField, eps?: number): Expr;
121
- /** The perspective view ray for a pseudo-3D surface, locals-bound. */
210
+ /**
211
+ * The direction the viewer looks along at this pixel, for reflections that sweep across a face.
212
+ *
213
+ * A unit 3D vector pointing into the canvas. `fov` sets how much it leans off-axis toward
214
+ * the edges (0.6 is the usual value, 0.55 flatter).
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * const view = viewRay(params, field)
219
+ * ```
220
+ * @see grazingOf, reflect, studioSoftboxes
221
+ */
122
222
  export declare function viewRay(params: GpuFragmentParams, field: SurfaceField, fov?: number): Expr;
123
- /** How edge-on the surface is to the view (0 face-on → 1 grazing), locals-bound. */
223
+ /**
224
+ * How edge-on the surface is to the viewer: 0 face-on, 1 grazing.
225
+ *
226
+ * The input the fresnel words take when you have a view ray. Without one, use `grazingFlat`.
227
+ *
228
+ * @example
229
+ * ```ts
230
+ * const grazing = grazingOf(n, viewRay(params, field))
231
+ * ```
232
+ * @see grazingFlat, fresnelBoost, schlickFresnel
233
+ */
124
234
  export declare function grazingOf(n: Expr, view: Expr): Expr;
125
- /** Tilt a normal within a direction frame: `along`/`across` are slope amounts per axis. */
235
+ /**
236
+ * Tilts a normal along and across a direction, for brushed or woven relief.
237
+ *
238
+ * `frame` is a `directionFrame` (from `frames`). `along` and `across` are slope amounts; a
239
+ * few tenths is a visible relief.
240
+ *
241
+ * @example
242
+ * ```ts
243
+ * const n = tiltNormal(nGeo, brush, {across: reliefAcross, along: reliefAlong})
244
+ * ```
245
+ * @see nudgeNormal, tiltAlong, grainNoise
246
+ */
126
247
  export declare function tiltNormal(n: Expr, frame: DirectionFrame, slopes: {
127
248
  along?: Expr;
128
249
  across?: Expr;
129
250
  }, hint?: string): Expr;
130
- /** The shared 5-softbox studio bank, looked up at a reflected direction. */
251
+ /**
252
+ * The brightness of a five-light studio seen in a reflected direction.
253
+ *
254
+ * Pass the x and y of a reflected view ray. `rotation` is a `direction()` vector that turns
255
+ * the studio. `keyRadius` sizes the main light (0.16 crisp, 0.42 soft), `drift` slides it,
256
+ * `strength` scales the whole bank and `skyGain` the floor-to-sky gradient behind it (0.3–0.4).
257
+ *
258
+ * @example
259
+ * ```ts
260
+ * const env = studioSoftboxes(R.member('x'), R.member('y'), {rotation: direction(u.envRotation), keyRadius: 0.3, drift: 0, strength: u.environment, skyGain: 0.38})
261
+ * ```
262
+ * @tip Smear it with `smearAlong` for a brushed look.
263
+ * @see smearAlong, reflect, viewRay
264
+ */
131
265
  export declare function studioSoftboxes(x: Expr, y: Expr, opts: {
132
- /** The studio rotation as a `direction()` vector. */
266
+ /** A `direction()` vector that rotates the studio. */
133
267
  rotation: Expr;
134
268
  keyRadius: Expr | number;
135
269
  drift: Expr | number;
@@ -137,9 +271,17 @@ export declare function studioSoftboxes(x: Expr, y: Expr, opts: {
137
271
  skyGain: number;
138
272
  }): Expr;
139
273
  /**
140
- * Grain-space noise: one octave of value noise over a direction frame's coordinates, with a
141
- * frequency per axis. Octave sums, gains, and drift terms are algebra at the call site — they
142
- * are the look; this is the sampling.
274
+ * One octave of smooth signed noise along and across a direction, for grain.
275
+ *
276
+ * `coords` come from `directionFrame(...).coordsOf(p)`. `freq` sets the feature density per
277
+ * axis (a high across value gives fine streaks). Returns roughly −1 to 1. Sum octaves and
278
+ * apply gains at the call site.
279
+ *
280
+ * @example
281
+ * ```ts
282
+ * const sheen = grainNoise(brush.coordsOf(pat), {freq: [1.3, 6.5], drift: driftA})
283
+ * ```
284
+ * @see surfaceNoise, tiltNormal, smearAlong
143
285
  */
144
286
  export declare function grainNoise(coords: {
145
287
  along: Expr;
@@ -150,9 +292,16 @@ export declare function grainNoise(coords: {
150
292
  drift?: Expr;
151
293
  }): Expr;
152
294
  /**
153
- * A gaussian-weighted directional gather: sample `taps` points spread along `axis` around
154
- * `center`, summed with baked normalized weights. The anisotropic smear of any 2D lookup —
155
- * a reflected environment along a brush grain, a streaked highlight, a motion smear.
295
+ * Blurs any 2D lookup along a direction, for streaked reflections and motion smear.
296
+ *
297
+ * Samples `taps` points (default 9) spread `spread` either side of `center` along the unit
298
+ * vector `axis`, weighted by a bell curve, and sums them. `sample` receives an x and a y.
299
+ *
300
+ * @example
301
+ * ```ts
302
+ * const env = smearAlong({center: R, axis: brush.tangent, spread: 0.3}, (x, y) => studioSoftboxes(x, y, studio))
303
+ * ```
304
+ * @see studioSoftboxes, grainNoise
156
305
  */
157
306
  export declare function smearAlong(opts: {
158
307
  center: Expr;
@@ -162,22 +311,53 @@ export declare function smearAlong(opts: {
162
311
  sigma?: number;
163
312
  hint?: string;
164
313
  }, sample: (x: Expr, y: Expr) => Expr): Expr;
165
- /** A 3D light direction from a `direction()` vector and an eye-tuned elevation z. */
314
+ /**
315
+ * A 3D light direction from a `direction()` vector and an elevation.
316
+ *
317
+ * `z` is negative for a light on the viewer's side of the surface (−0.6 raking to −0.9
318
+ * frontal). Use it where a word wants a unit light vector. `keyLightAt` also gives the half
319
+ * vector for highlights.
320
+ *
321
+ * @example
322
+ * ```ts
323
+ * const L = lightVec3(direction(u.lightAngle), -0.7)
324
+ * ```
325
+ * @see keyLightAt, anisoSpecular, lambert
326
+ */
166
327
  export declare function lightVec3(dir: Expr, z: number, hint?: string): Expr;
167
- /** The house roughness/anisotropy → Ward lobe-width mapping (stretch along, squeeze across). */
328
+ /**
329
+ * Turns roughness and anisotropy sliders (0–1 each) into the two lobe widths `anisoSpecular` takes.
330
+ *
331
+ * Higher roughness widens the highlight. Higher anisotropy stretches it along the grain and
332
+ * squeezes it across.
333
+ *
334
+ * @example
335
+ * ```ts
336
+ * alphas: wardAlphas(u.roughness, u.anisotropy)
337
+ * ```
338
+ * @see anisoSpecular
339
+ */
168
340
  export declare function wardAlphas(roughness: Expr, anisotropy: Expr): {
169
341
  along: Expr;
170
342
  across: Expr;
171
343
  };
172
344
  /**
173
- * Anisotropic (Ward) specular lobe: stretched along `tangent`, widths per axis from `alphas`
174
- * (see {@link wardAlphas} for the designer-terms mapping).
345
+ * A highlight stretched along a grain, as on brushed metal or carbon fibre.
346
+ *
347
+ * `tangent` is the 2D grain direction, `light` a unit 3D light vector, `view` the view ray
348
+ * and `alphas` the widths from `wardAlphas`. Pass `gain` or scale the result yourself.
349
+ *
350
+ * @example
351
+ * ```ts
352
+ * const spec = anisoSpecular({normal: n, tangent: brush.tangent, light: lightVec3(direction(u.lightAngle), -0.7), view, alphas: wardAlphas(rough, aniso), gain: u.specular})
353
+ * ```
354
+ * @see wardAlphas, lightVec3, sharpGlint, dualLobeGlint
175
355
  */
176
356
  export declare function anisoSpecular(opts: {
177
357
  normal: Expr;
178
- /** The grain/fibre tangent (2D — in-plane). */
358
+ /** The 2D grain direction. */
179
359
  tangent: Expr;
180
- /** Normalized 3D light direction (see {@link lightVec3}). */
360
+ /** A unit 3D light direction (see `lightVec3`). */
181
361
  light: Expr;
182
362
  view: Expr;
183
363
  alphas: {
@@ -186,90 +366,349 @@ export declare function anisoSpecular(opts: {
186
366
  };
187
367
  gain?: Expr | number;
188
368
  }): Expr;
189
- /** Tilt a normal along one in-plane axis by a slope amount. */
369
+ /**
370
+ * Tilts a normal along one 2D direction by a slope amount.
371
+ *
372
+ * `axis` is a unit 2D vector such as `direction()` or `fieldSlope`. A few tenths is a
373
+ * visible tilt.
374
+ *
375
+ * @example
376
+ * ```ts
377
+ * const n = tiltAlong(nGeo, weaveDir, mul(crown, 0.3))
378
+ * ```
379
+ * @see tiltNormal, nudgeNormal
380
+ */
190
381
  export declare function tiltAlong(n: Expr, axis: Expr, amount: Expr, hint?: string): Expr;
191
- /** Fresnel edge lift: `1 + grazing^power · amount`. */
382
+ /**
383
+ * A multiplier that brightens grazing edges: 1 face-on, up to `1 + amount` at the rim.
384
+ *
385
+ * `grazing` comes from `grazingOf` or `grazingFlat`. `power` (default 3) sets how tightly
386
+ * the lift hugs the rim.
387
+ *
388
+ * @example
389
+ * ```ts
390
+ * const lit = mul(env, fresnelBoost(grazingOf(n, view), {amount: 0.6}))
391
+ * ```
392
+ * @see schlickFresnel, grazingOf, grazingFlat
393
+ */
192
394
  export declare function fresnelBoost(grazing: Expr, opts: {
193
395
  power?: number;
194
396
  amount: Expr | number;
195
397
  }): Expr;
196
- /** A two-tone tint ramp: dark → light by a lighting term (Duotone's ramp as material tint). */
398
+ /**
399
+ * Maps a lighting value (0 dark, 1 light) onto two colors.
400
+ *
401
+ * Takes color props and returns rgb. The final tint of a material lit in grey.
402
+ *
403
+ * @example
404
+ * ```ts
405
+ * const rgb = tintRamp(lit, u.darkColor, u.lightColor)
406
+ * ```
407
+ * @see neutralTone, cosineRainbow
408
+ */
197
409
  export declare function tintRamp(t: Expr, dark: Expr, light: Expr): Expr;
198
- /** The soft silhouette alpha at the shape boundary. */
410
+ /**
411
+ * The shape's coverage at this pixel: 1 inside, 0 outside, soft across the edge.
412
+ *
413
+ * `edgeSoftness` is the softness prop; at 0 the edge is still anti-aliased over 1.5 pixels.
414
+ * Use it as the alpha of the color you return.
415
+ *
416
+ * @example
417
+ * ```ts
418
+ * return guarded(insideShape(field.sdf, field.pxH), vec4(rgb, silhouette(field, u.edgeSoftness)), vec4(0, 0, 0, 0))
419
+ * ```
420
+ * @see insideShape, guarded
421
+ */
199
422
  export declare function silhouette(field: SurfaceField, edgeSoftness: Expr): Expr;
200
- /** The neutral filmic tonemap shoulder (exposure grading's final step). */
423
+ /**
424
+ * Compresses bright color back into range without shifting its hue.
425
+ *
426
+ * The last step of a metal or glass look that adds reflection on top of a base color.
427
+ * `exposureTone` is the cousin for emitted light.
428
+ *
429
+ * @example
430
+ * ```ts
431
+ * const rgb = neutralTone(mul(env, u.tint.member('rgb')))
432
+ * ```
433
+ * @see exposureTone
434
+ */
201
435
  export declare function neutralTone(rgb: Expr): Expr;
202
- /** Nudge a normal by screen-space slope deltas (the isotropic cousin of `tiltNormal`). */
436
+ /**
437
+ * Tilts a normal by a slope in x and y, turning a height field into relief.
438
+ *
439
+ * Feed it the `dx`/`dy` of `fdSlope` or `perlinSlope`, scaled by how strong you want the
440
+ * relief. Works on a flat `vec3(0, 0, -1)` normal as well as a shape's normal.
441
+ *
442
+ * @example
443
+ * ```ts
444
+ * const n = nudgeNormal(vec3(0, 0, -1), mul(relief.dx, 0.08), mul(relief.dy, 0.08))
445
+ * ```
446
+ * @see fdSlope, perlinSlope, tiltNormal, geometricNormal
447
+ */
203
448
  export declare function nudgeNormal(n: Expr, dx: Expr, dy: Expr, hint?: string): Expr;
204
- /** The volumetric field-tap normal (marched shapes). Flat shapes shape their own — see
205
- * {@link geometricNormal} for the standard bevelled path. */
449
+ /**
450
+ * The surface normal of a 3D shape, from the marched depth.
451
+ *
452
+ * Only meaningful when `frame.volumetric` is true. `geometricNormal` chooses between this
453
+ * and the flat-shape normal for you. `sharpness` clamps the slope (default 5; 4 is calmer,
454
+ * 6 crisper).
455
+ *
456
+ * @example
457
+ * ```ts
458
+ * const n = frame.volumetric ? marchedNormal(field, 4) : flatNormal
459
+ * ```
460
+ * @see geometricNormal
461
+ */
206
462
  export declare function marchedNormal(field: SurfaceField, sharpness?: number, hint?: string): Expr;
207
- /** The key-light frame from a `direction()` vector: `.L` light dir, `.H` half vector.
208
- * `elevation` is the material's eye-tuned z (the fleet uses −0.6 … −0.9). */
463
+ /**
464
+ * A key light from an angle: the light direction `.L` and the half vector `.H` for highlights.
465
+ *
466
+ * `dir` is a `direction()` vector (from `frames`). `elevation` is how far the light sits
467
+ * toward the viewer: −0.6 raking, −0.9 frontal. Read `.L` with `member('L')` for `lambert`
468
+ * and `.H` for a glint.
469
+ *
470
+ * @example
471
+ * ```ts
472
+ * const key = keyLightAt(direction(u.lightAngle), -0.7)
473
+ * ```
474
+ * @tip Elevation is negative in this engine. A positive value lights the surface from behind.
475
+ * @see keyLightXY, lightVec3, lambert, dualLobeGlint, sharpGlint
476
+ */
209
477
  export declare function keyLightAt(dir: Expr, elevation: number, hint?: string): Expr;
210
- /** {@link keyLightAt} from explicit in-plane components (shimmered / cross lights). */
478
+ /**
479
+ * A key light from explicit x and y components, for a second or a crossed light.
480
+ *
481
+ * Same result as `keyLightAt`: `.L` and `.H`.
482
+ *
483
+ * @example
484
+ * ```ts
485
+ * const fill = keyLightXY(mul(ly, -1), lx, -0.4, 'fill')
486
+ * ```
487
+ * @see keyLightAt
488
+ */
211
489
  export declare function keyLightXY(x: Expr, y: Expr, elevation: number, hint?: string): Expr;
212
- /** Grazing factor for the fixed −z view (the fresnel input when no perspective ray exists). */
490
+ /**
491
+ * How edge-on the surface is to a straight-on viewer: 0 face-on, 1 grazing.
492
+ *
493
+ * Use it when the material has no `viewRay`. The fresnel input for plastics, frost and water.
494
+ *
495
+ * @example
496
+ * ```ts
497
+ * const grazing = grazingFlat(n)
498
+ * ```
499
+ * @see grazingOf, schlickFresnel, fresnelBoost
500
+ */
213
501
  export declare function grazingFlat(n: Expr): Expr;
214
- /** Sharp key-light glint lobe. */
502
+ /**
503
+ * A highlight whose tightness follows a sharpness slider.
504
+ *
505
+ * `ndh` is the dot of the normal and the key light's `.H`. `sharpness` runs 0–1 and slides
506
+ * the exponent from `cfg.x` to `cfg.y` and the gain from `cfg.z` to `cfg.w`. Pass `cfg` as
507
+ * `vec4(soft exponent, sharp exponent, soft gain, sharp gain)`.
508
+ *
509
+ * @example
510
+ * ```ts
511
+ * const spec = sharpGlint(dot(n, key.member('H')), u.sharpness, vec4(60, 900, 0.4, 1.4))
512
+ * ```
513
+ * @see dualLobeGlint, anisoSpecular, keyLightAt
514
+ */
215
515
  export declare function sharpGlint(ndh: Expr, sharpness: Expr, cfg: Expr): Expr;
216
- /** Clamped perlin slope — the pressed/molten waviness gradient two metals nudge normals with. */
516
+ /**
517
+ * The slope of smooth noise at a point, for wavy or molten relief.
518
+ *
519
+ * Returns a 2D slope scaled by `gain` and clamped to ±4, so relief never spikes into seams.
520
+ * Feed its x and y to `nudgeNormal`.
521
+ *
522
+ * @example
523
+ * ```ts
524
+ * const hg = perlinSlope(pat, 0.62)
525
+ * const n = nudgeNormal(nGeo, mul(hg.member('x'), -0.5), mul(hg.member('y'), -0.5))
526
+ * ```
527
+ * @see nudgeNormal, fdSlope, flowWarp
528
+ */
217
529
  export declare function perlinSlope(q: Expr, gain: Expr | number): Expr;
218
- /** Optical body thickness of the shape field (chord on marched shapes, rim proxy on flat). */
530
+ /**
531
+ * How much material the view passes through at this pixel: 0 at the edge, up to about 1.2 deep inside.
532
+ *
533
+ * Multiply by a density prop and feed `beerLambert` for glass, ice and water.
534
+ *
535
+ * @example
536
+ * ```ts
537
+ * const thickness = mul(opticalThickness(field, frame), u.density)
538
+ * ```
539
+ * @see beerLambert
540
+ */
219
541
  export declare function opticalThickness(field: SurfaceField, frame: SurfaceFrame): Expr;
220
- /** Beer–Lambert transmission: `exp(−thickness · absorb)` per channel. */
542
+ /**
543
+ * How much light survives a thickness of tinted material, per channel.
544
+ *
545
+ * `absorb` is an rgb absorption; higher absorbs more. Returns rgb transmission 0–1.
546
+ * Multiply the color behind by it.
547
+ *
548
+ * @example
549
+ * ```ts
550
+ * const transmit = beerLambert(mul(opticalThickness(field, frame), u.density), absorb)
551
+ * ```
552
+ * @see opticalThickness
553
+ */
221
554
  export declare function beerLambert(thickness: Expr, absorb: Expr): Expr;
222
- /** The shared incommensurate-frequency flow-warp offset (molten folds / wind-driven waves). */
555
+ /**
556
+ * A slowly folding 2D offset to add to pattern coordinates, for molten or wind-blown motion.
557
+ *
558
+ * `warpInput` is the pattern coordinate scaled by about 0.6, `flowT` the layer's clock times a
559
+ * speed. Add the result to the coordinate before sampling noise.
560
+ *
561
+ * @example
562
+ * ```ts
563
+ * const q = add(pat, mul(flowWarp(mul(pat, 0.6), flowT), u.warp))
564
+ * ```
565
+ * @see surfaceNoiseAt, perlinSlope
566
+ */
223
567
  export declare function flowWarp(warpInput: Expr, flowT: Expr): Expr;
224
- /** Signed value noise sampled at a surface point (the material grain/crumple basis). */
568
+ /**
569
+ * Smooth signed noise at a 2D point, roughly −1 to 1, with features about one unit wide.
570
+ *
571
+ * The basis for grain, crumple and frost. Scale the inputs to set the feature size.
572
+ *
573
+ * @example
574
+ * ```ts
575
+ * const grain = surfaceNoise(mul(pat.member('x'), 140), mul(pat.member('y'), 140))
576
+ * ```
577
+ * @see surfaceNoiseAt, valueNoise, hashNoise, grainNoise
578
+ */
225
579
  export declare function surfaceNoise(x: Expr | number, y: Expr | number): Expr;
226
- /** {@link surfaceNoise} at a pre-built vec2 point. */
580
+ /**
581
+ * `surfaceNoise` at a 2D point you already hold.
582
+ *
583
+ * @example
584
+ * ```ts
585
+ * const n = surfaceNoiseAt(mul(pat, 6))
586
+ * ```
587
+ * @see surfaceNoise, volumeNoiseAt, cellNoiseAt
588
+ */
227
589
  export declare function surfaceNoiseAt(p: Expr): Expr;
228
- /** Signed noise sampled at an interior volume point (vec3) — the 3D cousin of
229
- * {@link surfaceNoiseAt}: the basis for anything sampled THROUGH a body rather than
230
- * across its surface (gas, smoke, inclusions, subsurface density). */
590
+ /**
591
+ * Smooth signed noise at a 3D point, roughly −1 to 1.
592
+ *
593
+ * For anything sampled through a body rather than across its surface: gas, smoke,
594
+ * inclusions, density.
595
+ *
596
+ * @example
597
+ * ```ts
598
+ * const density = volumeNoiseAt(vec3(pos.member('x'), pos.member('y'), t))
599
+ * ```
600
+ * @see surfaceNoiseAt
601
+ */
231
602
  export declare function volumeNoiseAt(p: Expr): Expr;
232
- /** IQ cosine palette: a smooth rainbow ramp with per-channel phase offsets. */
603
+ /**
604
+ * A smooth rainbow color from a value that wraps every 1.
605
+ *
606
+ * `phases` offset the red, green and blue cycles; `[0, 1/3, 2/3]` is the full spectrum. The
607
+ * color behind holographic foil and thin-film iridescence.
608
+ *
609
+ * @example
610
+ * ```ts
611
+ * const rgb = cosineRainbow(mul(grazing, 3), [0, 1 / 3, 2 / 3])
612
+ * ```
613
+ * @see tintRamp
614
+ */
233
615
  export declare function cosineRainbow(t: Expr, phases: [number, number, number]): Expr;
234
- /** Worley (cellular) noise at a surface point — the facet/crack cell basis. */
616
+ /**
617
+ * Cellular noise at a 2D point: 0 at each cell's seed point, rising toward the cell walls.
618
+ *
619
+ * The value is a squared distance in cell units. Use it for facets and cracks, or as the
620
+ * field `fdSlope` differentiates for faceted relief.
621
+ *
622
+ * @example
623
+ * ```ts
624
+ * const facet = fdSlope(cellNoiseAt, mul(pat, 6), 0.002)
625
+ * ```
626
+ * @see fdSlope, surfaceNoiseAt, pointStars
627
+ */
235
628
  export declare function cellNoiseAt(p: Expr): Expr;
236
629
  /**
237
- * Finite-difference slope of any scalar surface field: the field's value at `p` plus its
238
- * x/y derivatives at step `eps` — the relief-to-normal bridge every bump recipe rides.
630
+ * The value and slope of any field at a point: `value`, `dx` and `dy`.
631
+ *
632
+ * `sampleAt` is the field as a function of a 2D point, `eps` the tap distance in that point's
633
+ * units (a few thousandths in uv). The bridge from a height field to a normal: feed `dx` and
634
+ * `dy` to `nudgeNormal`.
635
+ *
636
+ * @example
637
+ * ```ts
638
+ * const relief = fdSlope((at) => heightField(params, at), uv, 0.0035)
639
+ * ```
640
+ * @tip Three taps of the field per pixel. Keep the field cheap or `share` it.
641
+ * @see nudgeNormal, perlinSlope, cellNoiseAt
239
642
  */
240
643
  export declare function fdSlope(sampleAt: (p: Expr) => Expr, p: Expr, eps: number, hint?: string): {
241
644
  value: Expr;
242
645
  dx: Expr;
243
646
  dy: Expr;
244
647
  };
245
- /** Unsigned white-noise hash of a 2D point (film grain, flicker, per-pixel jitter). */
648
+ /**
649
+ * Random 0–1 per point, with no smoothness between neighbours.
650
+ *
651
+ * For grain, flicker and per-pixel jitter. Feed it large coordinates so every pixel differs.
652
+ *
653
+ * @example
654
+ * ```ts
655
+ * const grain = hashNoise(mul(uv.member('x'), 991.3), mul(uv.member('y'), 787.7))
656
+ * ```
657
+ * @see interleavedNoise, valueNoise, sensorGrain
658
+ */
246
659
  export declare function hashNoise(x: Expr | number, y: Expr | number): Expr;
247
660
  /**
248
- * Interleaved gradient noise over device pixels: a [0,1) pattern whose neighbouring pixels are
249
- * maximally different (Jimenez 2014) — the low-discrepancy cousin of {@link hashNoise} for
250
- * jittering samples, where white noise clumps into visible grain. `clock` advances the pattern
251
- * by the golden ratio per unit so successive frames decorrelate.
661
+ * A 0–1 dither pattern over device pixels where neighbours differ as much as possible.
662
+ *
663
+ * Better than `hashNoise` for jittering sample positions, which would otherwise clump into
664
+ * visible grain. `pixel` is the pixel coordinate (uv times the viewport size). `clock`
665
+ * shifts the pattern each frame.
666
+ *
667
+ * @example
668
+ * ```ts
669
+ * const jitter = interleavedNoise(mul(uv, viewport), frame)
670
+ * ```
671
+ * @see hashNoise, sensorGrain
252
672
  */
253
673
  export declare function interleavedNoise(pixel: Expr, clock?: Expr | number): Expr;
254
- /** Unsigned smooth value noise at a surface point (the [0,1] cousin of {@link surfaceNoise}). */
674
+ /**
675
+ * Smooth noise 0–1 at a 2D point, softer and blockier than `surfaceNoise`.
676
+ *
677
+ * @example
678
+ * ```ts
679
+ * const wobble = sub(valueNoise(mul(x, 4), mul(y, 3)), 0.5)
680
+ * ```
681
+ * @see surfaceNoise, hashNoise
682
+ */
255
683
  export declare function valueNoise(x: Expr | number, y: Expr | number): Expr;
256
684
  /**
257
- * How rotated the 3D shape is, as an in-plane pan vector: one field tap at the placement
258
- * centre reads the surface-locked pattern coords of the centre hit (zero at rest on every
259
- * shape, growing with 3D rotation). Spatially constant per frame, so it pans content
260
- * (star planes, interior backdrops) without shearing it; flat shapes gate to zero.
261
- * Requires `pattern: 'raw'`.
685
+ * How far a 3D shape has rotated, as a 2D pan you can move content by.
686
+ *
687
+ * Zero on flat shapes and on any shape at rest, growing as the shape turns. Constant across
688
+ * the frame, so it pans a star field or a backdrop without shearing it. Needs `pattern: 'raw'`.
689
+ *
690
+ * @example
691
+ * ```ts
692
+ * const pan = rotationSensor(frame)
693
+ * ```
694
+ * @see shellRefract, surfacePattern
262
695
  */
263
696
  export declare function rotationSensor(frame: SurfaceFrame): {
264
697
  x: Expr;
265
698
  y: Expr;
266
699
  };
267
700
  /**
268
- * Interior coordinates bent at the shell: centered placement coords displaced along the
269
- * surface normal's in-plane tilt. `n.xy` is ~0 on a flat face and large at bevels and
270
- * silhouettes, so the bend concentrates where real glass would bend the interior — the
271
- * cheap single-interface cousin of a full refraction trace. Also returns the unbent
272
- * centered coords for anything anchored to the container rather than the interior.
701
+ * Coordinates for what sits inside a glass shell, bent where the shell curves.
702
+ *
703
+ * Returns `x` and `y` centred on the shape and displaced by the normal's tilt times
704
+ * `amount`, plus the unbent `centered` pair for anything fixed to the container. The bend is
705
+ * strongest at bevels and silhouettes, where real glass bends its interior.
706
+ *
707
+ * @example
708
+ * ```ts
709
+ * const interior = shellRefract(frame, n, u.bend)
710
+ * ```
711
+ * @see rotationSensor, refract
273
712
  */
274
713
  export declare function shellRefract(frame: SurfaceFrame, n: Expr, amount: Expr): {
275
714
  x: Expr;
@@ -279,41 +718,67 @@ export declare function shellRefract(frame: SurfaceFrame, n: Expr, amount: Expr)
279
718
  y: Expr;
280
719
  };
281
720
  };
282
- /** Schlick fresnel reflectance: `r0 + grazing^power · gain`. Physical glass is
283
- * `{r0: 0.04, gain: 0.96}`; lower the gain to keep grazing faces from curtaining
284
- * an interior behind full mirror. */
721
+ /**
722
+ * How mirror-like a surface is at this pixel: `r0` face-on, rising to `r0 + gain` at the rim.
723
+ *
724
+ * `grazing` comes from `grazingOf` or `grazingFlat`. Glass is `{r0: 0.04, gain: 0.96}`. Lower
725
+ * the gain to keep the rim from turning into a full mirror over an interior.
726
+ *
727
+ * @example
728
+ * ```ts
729
+ * const fresnel = schlickFresnel(grazingOf(n, view), {gain: 0.6})
730
+ * ```
731
+ * @see fresnelBoost, grazingOf, reflect
732
+ */
285
733
  export declare function schlickFresnel(grazing: Expr, opts: {
286
734
  r0?: number;
287
735
  gain: Expr | number;
288
736
  power?: number;
289
737
  }): Expr;
290
- /** A per-element shimmer factor around 1: `1 − amount + sin(t·rate + phase·spread)·amount`.
291
- * `phase` decorrelates elements (a per-star/per-flake variation field). */
738
+ /**
739
+ * A brightness factor that shimmers over time, different for each element.
740
+ *
741
+ * Ranges from `1 − 2·amount` to 1. `phase` is a per-element value (a noise or a hash) that
742
+ * keeps the elements out of step; `rate` is how fast, `spread` how differently they flicker.
743
+ *
744
+ * @example
745
+ * ```ts
746
+ * shimmer: (v) => twinkle(t, v, {amount: 0.3, rate: 1.7, spread: 40})
747
+ * ```
748
+ * @see pointStars
749
+ */
292
750
  export declare function twinkle(t: Expr, phase: Expr, opts: {
293
751
  amount: Expr;
294
752
  rate: number;
295
753
  spread: number;
296
754
  }): Expr;
297
755
  /**
298
- * A plane of point glints — stars, glitter, bokeh dust: worley feature points lit only
299
- * within a tiny radius, gated to a sparse subset and sized/brightened per point by a slow
300
- * variation field. Returns the glint intensity and the variation field (for tinting).
301
- * The worley metric is squared distance in cell units, so radii are in those units.
756
+ * A plane of sparse glinting points: stars, glitter, dust.
757
+ *
758
+ * `p` is the plane coordinate; scale it to set density. Returns the glint intensity, the slow
759
+ * per-point `variation` field, and `rgb` when `tint` is given. Radii are in the cellular
760
+ * noise's squared-distance units, so they are small (0.004–0.02).
761
+ *
762
+ * @example
763
+ * ```ts
764
+ * const stars = pointStars(mul(pat, 40), {variationFreq: 0.13, radius: [0.004, 0.013], keep: [0.35, 0.75], brightness: [0.3, 1.2], gain: u.stars, tint: {from: [0.72, 0.82, 1], to: [1, 0.92, 0.82], gain: 1.6}})
765
+ * ```
766
+ * @see twinkle, cellNoiseAt
302
767
  */
303
768
  export declare function pointStars(p: Expr, opts: {
304
- /** Frequency of the per-point variation field relative to `p` (slow: ~0.1). */
769
+ /** Frequency of the per-point variation field relative to `p` (slow, about 0.1). */
305
770
  variationFreq: number;
306
- /** Point radius: base + variation · jitter (squared-distance units). */
771
+ /** Point radius as `[base, jitter]`: base plus variation times jitter. */
307
772
  radius: [number, number];
308
- /** smoothstep band of the variation field that keeps a point at all (sparsity). */
773
+ /** The band of the variation field that keeps a point at all. Narrower is sparser. */
309
774
  keep: [number, number];
310
- /** Brightness: base + variation² · gain. */
775
+ /** Brightness as `[base, gain]`: base plus variation squared times gain. */
311
776
  brightness: [number, number];
312
- /** Per-point shimmer factor, built from the variation field (see {@link twinkle}). */
777
+ /** A per-point shimmer factor built from the variation field (see `twinkle`). */
313
778
  shimmer?: (variation: Expr) => Expr;
314
779
  /** Overall gain. */
315
780
  gain: Expr;
316
- /** color the glints: variation mixes `from` → `to`, scaled by the glint × `gain`. */
781
+ /** Color the glints: variation mixes `from` to `to`, scaled by the glint times `gain`. */
317
782
  tint?: {
318
783
  from: [number, number, number];
319
784
  to: [number, number, number];
@@ -326,21 +791,31 @@ export declare function pointStars(p: Expr, opts: {
326
791
  rgb?: Expr;
327
792
  };
328
793
  /**
329
- * A `transformPosition` prop mapped into the shape's placement (sdfUV) space — the same
330
- * aspect/rotation/scale placement the field is sampled in, so a light, anchor or pointer position
331
- * can be compared against field coordinates directly. Placement-space distances are the field's
332
- * units (the shape's own scale), not screen units.
794
+ * A position prop in the shape's own coordinates, so you can compare it with the field.
795
+ *
796
+ * Takes a `transformPosition` prop and applies the same center, scale and rotation the shape
797
+ * has. Distances from it are in placement units, not canvas units.
798
+ *
799
+ * @example
800
+ * ```ts
801
+ * const lightUV = placementPoint(params, params.uniforms.lightPosition)
802
+ * ```
803
+ * @see pointLightFrom, nearestEdge
333
804
  */
334
805
  export declare function placementPoint(params: GpuFragmentParams, position: Expr, hint?: string): Expr;
335
806
  /**
336
- * The field continued beyond its texture. The flat SVG sampler clamps to its 0–1 square, so a
337
- * far-reaching effect (a glow, a cast shadow) would see a plateau past it. The continuation is a
338
- * sphere-trace-safe LOWER bound — `max(beyond, border − beyond)`, the shape being inside the
339
- * square — not `border + beyond`, which is an upper bound that a march overshoots through
340
- * (analytic fields need nothing). Returns the continued distance at the pixel, the outward push vector (zero within the square) to add to any
341
- * gradient taken from the clamped taps, and `at(uv)` — the continued distance anywhere (fast
342
- * neighbour-quality taps, flow-safe: the sampler for ray marches and shadow rays). Expects an
343
- * unscaled {@link surfaceField}.
807
+ * The distance field extended past the edge of an SVG shape's texture.
808
+ *
809
+ * An SVG field stops at its 0–1 square, so a far-reaching glow or shadow would see a plateau
810
+ * beyond it. Returns the extended distance here, an `outward` push to add to any slope taken
811
+ * near the border, and `at(uv)` for the distance anywhere. Pass an unscaled `surfaceField`.
812
+ * Flat and 3D shapes pass through unchanged.
813
+ *
814
+ * @example
815
+ * ```ts
816
+ * const far = continuedField(frame, field, params)
817
+ * ```
818
+ * @see nearestEdge, fieldSlope
344
819
  */
345
820
  export declare function continuedField(frame: SurfaceFrame, field: SurfaceField, params: GpuFragmentParams): {
346
821
  sdf: Expr;
@@ -348,18 +823,32 @@ export declare function continuedField(frame: SurfaceFrame, field: SurfaceField,
348
823
  at: (uv: Expr) => Expr;
349
824
  };
350
825
  /**
351
- * The nearest point of the shape boundary to this pixel and the outward unit normal there — where
352
- * a rim glow, contact shadow or edge light originates for pixels outside the shape. `slope` is
353
- * the in-plane field gradient (see {@link fieldSlope}); its length is guarded.
826
+ * The closest point on the shape's edge to this pixel, and the outward normal there.
827
+ *
828
+ * Where a rim glow or contact shadow comes from for pixels outside the shape. `slope` is
829
+ * `fieldSlope`; its length is guarded.
830
+ *
831
+ * @example
832
+ * ```ts
833
+ * const edge = nearestEdge(frame.sdfUV!, field.sdf, fieldSlope(field))
834
+ * ```
835
+ * @see fieldSlope, pointLightFrom, continuedField
354
836
  */
355
837
  export declare function nearestEdge(sdfUV: Expr, sdf: Expr, slope: Expr, hint?: string): {
356
838
  point: Expr;
357
839
  normal: Expr;
358
840
  };
359
841
  /**
360
- * A point light in placement space as seen from `at` (a 2D placement point on the shape plane):
361
- * the unit 3D light vector in the material convention (z negative = toward the viewer, matching
362
- * {@link lightVec3}), the in-plane unit direction toward the light, and the in-plane distance.
842
+ * A point light as seen from a point on the shape: the 3D light vector `L`, the 2D direction `toLight` and the `distance`.
843
+ *
844
+ * `position` is in placement coordinates (see `placementPoint`). `height` lifts the light
845
+ * toward the viewer, in the same units. Feed `L` to `lambert` and `distance` to `inverseSquare`.
846
+ *
847
+ * @example
848
+ * ```ts
849
+ * const onBody = pointLightFrom({position: lightUV, height: u.lightHeight}, frame.sdfUV!)
850
+ * ```
851
+ * @see placementPoint, lambert, inverseSquare, keyLightAt
363
852
  */
364
853
  export declare function pointLightFrom(light: {
365
854
  position: Expr;
@@ -370,23 +859,54 @@ export declare function pointLightFrom(light: {
370
859
  distance: Expr;
371
860
  };
372
861
  /**
373
- * Diffuse (Lambert) response of a normal to a unit light vector (2D or 3D pairs alike), with
374
- * optional wrap lighting: `wrap` 0 = strict hemisphere, 1 = the light reaches all the way round.
862
+ * How much a light falls on a surface: 0 facing away, 1 facing it.
863
+ *
864
+ * `normal` and `light` are unit vectors, both 2D or both 3D. `wrap` lets light reach around
865
+ * the shape: 0 is a hard terminator, 1 lights it all the way round.
866
+ *
867
+ * @example
868
+ * ```ts
869
+ * const diffuse = lambert(n, key.member('L'), {wrap: 0.3})
870
+ * ```
871
+ * @see keyLightAt, pointLightFrom, dualLobeGlint
375
872
  */
376
873
  export declare function lambert(normal: Expr, light: Expr, opts?: {
377
874
  wrap?: Expr | number;
378
875
  }): Expr;
379
- /** Inverse-square attenuation of a point light: 1 at the source, half strength at `range`. */
876
+ /**
877
+ * How a point light fades with distance: 1 at the source, half at `range`.
878
+ *
879
+ * @example
880
+ * ```ts
881
+ * const lit = mul(lambert(n, onBody.L), inverseSquare(onBody.distance, u.lightRange))
882
+ * ```
883
+ * @see pointLightFrom, lambert
884
+ */
380
885
  export declare function inverseSquare(distance: Expr, range: Expr | number): Expr;
381
886
  /**
382
- * Photographic exposure response `1 − e^(−rgb)`: light piles up toward white the way a bright
383
- * emitter burns out on film, instead of clipping per channel (the HDR → display step of any
384
- * emissive look; {@link neutralTone} is the graded-image cousin).
887
+ * Turns light that piles past 1 into a soft burn toward white, like film.
888
+ *
889
+ * Apply it to summed emitted light before output. `neutralTone` is the cousin for a lit,
890
+ * tinted surface.
891
+ *
892
+ * @example
893
+ * ```ts
894
+ * const glow = exposureTone(add(irradiance, emitter))
895
+ * ```
896
+ * @see neutralTone, sensorGrain
385
897
  */
386
898
  export declare function exposureTone(rgb: Expr): Expr;
387
899
  /**
388
- * Multiplicative sensor grain `rgb · (1 + (hash − 0.5) · amount)`, keyed per device pixel and
389
- * re-rolled by `clock` — the photon-noise floor that makes rendered light read as photographed.
900
+ * Adds a fine per-pixel brightness jitter, so rendered light reads as photographed.
901
+ *
902
+ * Each pixel is scaled by up to half of `amount` either way. `pixel` is the pixel coordinate
903
+ * (uv times the viewport size); `clock` re-rolls the grain each frame.
904
+ *
905
+ * @example
906
+ * ```ts
907
+ * const rgb = sensorGrain(glow, {amount: 0.08, pixel: mul(uv, viewport), clock: t})
908
+ * ```
909
+ * @see hashNoise, interleavedNoise, exposureTone
390
910
  */
391
911
  export declare function sensorGrain(rgb: Expr, opts: {
392
912
  amount: Expr | number;
@@ -394,14 +914,21 @@ export declare function sensorGrain(rgb: Expr, opts: {
394
914
  clock: Expr | number;
395
915
  }): Expr;
396
916
  /**
397
- * Two-lobe specular glint — a tight hot core plus a wide dim halo. `softness` widens or
398
- * tightens both lobes around the authored exponents (0.5 is neutral: the exponents as
399
- * given; 0 is ~4× sharper, 1 is ~4× softer).
917
+ * A highlight with a tight hot core and a wide dim halo.
918
+ *
919
+ * `ndh` is the dot of the normal and the key light's `.H`. `core` and `halo` are
920
+ * `[exponent, gain]` pairs. `softness` (0–1, 0.5 neutral) widens or tightens both lobes.
921
+ *
922
+ * @example
923
+ * ```ts
924
+ * const spec = dualLobeGlint(dot(n, key.member('H')), {core: [140, 1.3], halo: [22, 0.14], softness: u.highlightSoftness, gain: u.highlight})
925
+ * ```
926
+ * @see sharpGlint, keyLightAt, lambert
400
927
  */
401
928
  export declare function dualLobeGlint(ndh: Expr, opts: {
402
- /** [exponent, gain] of the hot core lobe. */
929
+ /** `[exponent, gain]` of the hot core lobe. */
403
930
  core: [number, number];
404
- /** [exponent, gain] of the wide halo lobe. */
931
+ /** `[exponent, gain]` of the wide halo lobe. */
405
932
  halo: [number, number];
406
933
  softness?: Expr;
407
934
  gain: Expr;