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.
- package/LICENSE +21 -142
- package/README.md +192 -19
- package/dist/cli.js +2 -2
- package/dist/core/{AngularBlur-Cx1HVeYk.js → AngularBlur-BEBs-lRR.js} +2 -3
- package/dist/core/{Arc-D3FuqnDL.js → Arc-D-WnjM7T.js} +1 -3
- package/dist/core/{Ascii-Dhn0H0LB.js → Ascii-BGPIwMc3.js} +2 -5
- package/dist/core/{Aurora-BUfyvIyq.js → Aurora-DqJBPdMQ.js} +2 -11
- package/dist/core/{BarShift-v3D-9Lx4.js → BarShift-BcCOweUh.js} +2 -3
- package/dist/core/{BarnDoors-C5g6Sbze.js → BarnDoors-B9B-AmCV.js} +2 -3
- package/dist/core/{Beam-CV5g8m92.js → Beam-QG_9OS8I.js} +2 -3
- package/dist/core/{Bend-BFWQSHF7.js → Bend-Cy9VAowL.js} +1 -2
- package/dist/core/{Blob-CLvqov4O.js → Blob-C3txJeW0.js} +2 -10
- package/dist/core/{BlockDissolve-DER9y4PE.js → BlockDissolve-C1SFUys7.js} +2 -3
- package/dist/core/{BlockNoise-DpXWJkDL.js → BlockNoise-Cm3y8hce.js} +2 -4
- package/dist/core/{BlueNoise-CSQPDpkm.js → BlueNoise-BCLObOMm.js} +2 -4
- package/dist/core/{Blur-B-Tg7Sfr.js → Blur-Dg29SnXd.js} +1 -2
- package/dist/core/{Boids-BZo85-QR.js → Boids-rsGsPN5h.js} +2 -5
- package/dist/core/{BokehBlur-B1tY-T6q.js → BokehBlur-rFSFEnb0.js} +2 -3
- package/dist/core/{BrickPattern-DVhe3RgK.js → BrickPattern-DqN6JKEN.js} +2 -3
- package/dist/core/{BrightnessContrast-DBLjHzyE.js → BrightnessContrast-J9fCSBiC.js} +1 -3
- package/dist/core/{BrushedMetal-CpXTd3nZ.js → BrushedMetal-74wSZKjG.js} +3 -8
- package/dist/core/{Bulge-CHcE-9Oo.js → Bulge-BIk0oq8j.js} +1 -2
- package/dist/core/{CRTScreen-CyBtBJS4.js → CRTScreen-hEH-JNRd.js} +2 -3
- package/dist/core/{CarbonFiber-DK-0jUEs.js → CarbonFiber-CZdUDvRU.js} +3 -7
- package/dist/core/{Chalkboard-PmgH_OhS.js → Chalkboard-CClJHqvs.js} +2 -3
- package/dist/core/{ChannelBlur-J3MHHcGy.js → ChannelBlur-BEuEwQOC.js} +1 -2
- package/dist/core/{CheckerWipe-Dj2kjjDA.js → CheckerWipe-KuAWj2qg.js} +2 -3
- package/dist/core/{Checkerboard-eFWETR1S.js → Checkerboard-Rq9ze1W3.js} +2 -3
- package/dist/core/{Chevron-ColsT0Fy.js → Chevron-C1j6X2Ye.js} +2 -3
- package/dist/core/{ChromaFlow-DrdCgPGz.js → ChromaFlow-BgsCUYIl.js} +2 -5
- package/dist/core/{ChromaticAberration-C_It6mLf.js → ChromaticAberration-2_4tjQ0u.js} +2 -4
- package/dist/core/{Chrome-2WZpUHiT.js → Chrome-Be3z6C5i.js} +4 -10
- package/dist/core/{Circle-C-AKxSw4.js → Circle-e_qQI3tU.js} +1 -3
- package/dist/core/{ColorWheel-DfF0tqXE.js → ColorWheel-s5ep1H7d.js} +2 -3
- package/dist/core/{CompressionArtifacts-Zvwlutd7.js → CompressionArtifacts-OE9U9Qrq.js} +1 -3
- package/dist/core/{ConcentricSpin-tC8mylMA.js → ConcentricSpin-CLE_5yCJ.js} +1 -2
- package/dist/core/{ConicGradient-CNYvyjSs.js → ConicGradient-Cji2SgVO.js} +2 -4
- package/dist/core/{ContourLines-C4642NJd.js → ContourLines-wpPK00cF.js} +2 -3
- package/dist/core/{CornerPin-BF5gFRv9.js → CornerPin-gYU0Uf2m.js} +2 -3
- package/dist/core/{Crescent-wC0IwPjx.js → Crescent-viNc7Unp.js} +1 -2
- package/dist/core/{Cross-BO7JQKSq.js → Cross-DyQSsw_k.js} +1 -2
- package/dist/core/{Crystal-BK3ifbmV.js → Crystal-Vjj8azWg.js} +4 -9
- package/dist/core/{CurlNoise-UbI-Zda_.js → CurlNoise-C7PHjDht.js} +2 -4
- package/dist/core/{CursorRipples-rJlfKhyh.js → CursorRipples-BzPPNkA3.js} +3 -39
- package/dist/core/{CursorTrail-BuyQdFKJ.js → CursorTrail-cBj0AuQA.js} +2 -4
- package/dist/core/{DataMosh-C_ZI55Qq.js → DataMosh-5Yr9TyVx.js} +1 -3
- package/dist/core/{DiamondGradient-CPhUCUoq.js → DiamondGradient-DZM7HwF5.js} +2 -4
- package/dist/core/{DiamondWipe-y6uIpJM4.js → DiamondWipe-CqeT7lCt.js} +2 -3
- package/dist/core/{DiffuseBlur-BNxowfOL.js → DiffuseBlur-Y5hSDTZF.js} +2 -3
- package/dist/core/{DisplacementMap-BuM2b1nC.js → DisplacementMap-FobRx5Ie.js} +2 -3
- package/dist/core/{Dither-Bt1qdRag.js → Dither-50rqHpt9.js} +2 -3
- package/dist/core/{DotGrid-DJFnwMVS.js → DotGrid-B6AGLUbR.js} +3 -4
- package/dist/core/{DropShadow-C-IfgfyH.js → DropShadow-CEPpgatB.js} +2 -3
- package/dist/core/{Duotone-DML_9JhJ.js → Duotone-D76Kp7Pb.js} +2 -3
- package/dist/core/{Ellipse-BuNUnN8D.js → Ellipse-BGod1LeG.js} +1 -2
- package/dist/core/{Emboss-DvKk4zwp.js → Emboss-DMNFb_ww.js} +3 -6
- package/dist/core/{Engraving-DPFVnIjD.js → Engraving-Dj7bCATQ.js} +2 -3
- package/dist/core/{ErosionNoise-j_b7a5cl.js → ErosionNoise-4O68wJQZ.js} +2 -4
- package/dist/core/{Exposure-DALA5K55.js → Exposure-h-vapOpj.js} +1 -3
- package/dist/core/{FallingLines-CeMOKpxK.js → FallingLines-Dzop_89k.js} +2 -3
- package/dist/core/{FilmGrain-DsDYCjjs.js → FilmGrain-Bs8PCfdf.js} +1 -3
- package/dist/core/{FilmStock-DtDMkwF6.js → FilmStock-DBjVo6rL.js} +1 -4
- package/dist/core/{Flip-B9Av9MVn.js → Flip-CfrS4KfZ.js} +2 -3
- package/dist/core/{FloatingParticles-BcMOBX1m.js → FloatingParticles-D1R2tD2J.js} +2 -5
- package/dist/core/{FlowField-BunLIU80.js → FlowField-Slirm5AI.js} +2 -3
- package/dist/core/{Flower-CvqBYUCU.js → Flower-Ddlut7QZ.js} +1 -2
- package/dist/core/{FlowingGradient-DQ284uMb.js → FlowingGradient-CwIgTtbj.js} +2 -7
- package/dist/core/{FlutedGlass-BP7av96Y.js → FlutedGlass-CMMy2GJ5.js} +2 -4
- package/dist/core/{Fog-DyyljY9e.js → Fog-DjjUkcTZ.js} +2 -4
- package/dist/core/{Form3D-x-G-Lz4z.js → Form3D-DQDOHWpC.js} +2 -4
- package/dist/core/{FractalNoise-DTgEv-Hq.js → FractalNoise-BjI3IOIj.js} +2 -4
- package/dist/core/{Frost-BhMELsXw.js → Frost-CK12HnL1.js} +3 -8
- package/dist/core/{GaborNoise-B7kmxcRZ.js → GaborNoise-DKEIvvRJ.js} +3 -5
- package/dist/core/{Glass-BMCOKCUL.js → Glass-CzcOVD5Y.js} +3 -8
- package/dist/core/{GlassTiles-DgVooh8h.js → GlassTiles-gjhc563g.js} +1 -2
- package/dist/core/{Glitch-D0pvMdGd.js → Glitch-C_XAWltC.js} +1 -2
- package/dist/core/{Glow-CJ3i0al6.js → Glow-CrYCanBI.js} +1 -3
- package/dist/core/{Godrays-DOV1VQ9x.js → Godrays-BBTMOVLP.js} +2 -3
- package/dist/core/{Goo-sMwsU21Y.js → Goo-Brhjk8aS.js} +3 -8
- package/dist/core/{GradientMap-CCuimQDS.js → GradientMap-C5325QWw.js} +2 -4
- package/dist/core/{Grayscale-DR1xnpde.js → Grayscale-dPjs-wvf.js} +1 -2
- package/dist/core/{Grid-CCUodqje.js → Grid-UjEd3O76.js} +3 -4
- package/dist/core/{GridDistortion-DUnC2Z_Y.js → GridDistortion-vVgYya1U.js} +1 -5
- package/dist/core/{Group--MS8ZNKg.js → Group-KVdmAi5g.js} +1 -1
- package/dist/core/{HTMLInCanvas-D_Rc6bs1.js → HTMLInCanvas-CKr2u76R.js} +1 -2
- package/dist/core/{Halftone-CG1LNQkk.js → Halftone-pRV3TRUW.js} +2 -3
- package/dist/core/{Heart-qPxh2CWp.js → Heart-CX7MvvHZ.js} +1 -2
- package/dist/core/{Heatmap-BZDfR2vC.js → Heatmap-Dn6qyd2e.js} +3 -8
- package/dist/core/{HexGrid-DquaiXLF.js → HexGrid-BIfYhkfV.js} +3 -4
- package/dist/core/{Hologram-JAXPZFx0.js → Hologram-ou27baPQ.js} +3 -7
- package/dist/core/{Holographic-BBHJp93D.js → Holographic-CiHdBSMg.js} +3 -7
- package/dist/core/{HueShift-a1Hl7gFy.js → HueShift-CG7pcXfg.js} +1 -3
- package/dist/core/{ImageTexture-CLW3uX1b.js → ImageTexture-BiZuU58C.js} +1 -2
- package/dist/core/{InkFlow-Dfd_5vYf.js → InkFlow-D9_L7opB.js} +2 -5
- package/dist/core/{Invert-DBEURmcL.js → Invert-CHEaiQZO.js} +1 -2
- package/dist/core/{IrisWipe-DTlGb8v-.js → IrisWipe-x22vOQHm.js} +2 -3
- package/dist/core/Irradiance-7yq2K87_.js +389 -0
- package/dist/core/{IsometricCubes-BgmQXJXU.js → IsometricCubes-CkPGWr7M.js} +2 -3
- package/dist/core/{Kaleidoscope-0adfaQ5F.js → Kaleidoscope-CEC5m1Ww.js} +1 -2
- package/dist/core/{KeyFrames-BqANGVzW.js → KeyFrames-BMGEZsAZ.js} +2 -3
- package/dist/core/{LensDistortion-DVRKCZv8.js → LensDistortion-DKo8PiO5.js} +2 -3
- package/dist/core/{LensFlare-C41jY4jH.js → LensFlare-DMS-NUtK.js} +2 -3
- package/dist/core/LightEdge-DxmnCRls.js +315 -0
- package/dist/core/{LightLeak-GWrDFcI_.js → LightLeak-yoEsZtYg.js} +2 -4
- package/dist/core/{Line-DuV7dLdM.js → Line-D17XDUjO.js} +2 -3
- package/dist/core/{LinearBlur-Bft2CjmO.js → LinearBlur-CiyjPTUH.js} +2 -3
- package/dist/core/{LinearGradient-BzIE4ReW.js → LinearGradient-DfjKG70q.js} +2 -4
- package/dist/core/{LinearWipe-ArRG9OCp.js → LinearWipe-D9CtBg6S.js} +2 -3
- package/dist/core/{LiquidMetal-BgvfhyiQ.js → LiquidMetal-8EG6DwV6.js} +3 -8
- package/dist/core/{Liquify-B6EigQqP.js → Liquify-BySXF1OB.js} +1 -4
- package/dist/core/{MagneticFilings-Dj35dlIq.js → MagneticFilings-DNESH3Zs.js} +2 -5
- package/dist/core/{Marble-0kfSSCDj.js → Marble-C9WvdxrP.js} +2 -7
- package/dist/core/{MeshGradient-DY_rUhFv.js → MeshGradient-d9--RXOU.js} +2 -10
- package/dist/core/{Mirror-C1AIyKmb.js → Mirror-1V2FF2kD.js} +1 -2
- package/dist/core/{MultiPointGradient-B9z1J-d8.js → MultiPointGradient-cRA9ytgL.js} +2 -3
- package/dist/core/{Nebula-mZDwq-yl.js → Nebula-BRV-q74y.js} +4 -87
- package/dist/core/{Neon-CyQE26dS.js → Neon-4PemK9Rj.js} +3 -6
- package/dist/core/{NoiseDissolve-DQbBbxlP.js → NoiseDissolve-B7LgD46G.js} +2 -3
- package/dist/core/{ObjectTracker-CZd20LeZ.js → ObjectTracker-CdzDxhpy.js} +2 -3
- package/dist/core/{Obsidian-CjKezopV.js → Obsidian-2J1eX9kT.js} +3 -9
- package/dist/core/{PagePeel-ulnjqZzc.js → PagePeel-D-ziraOm.js} +1 -2
- package/dist/core/{Paper-c_1INiUk.js → Paper-BxzCLyzB.js} +1 -2
- package/dist/core/{Parallelogram-CnjzV4-0.js → Parallelogram-D4OflTwn.js} +1 -2
- package/dist/core/{ParticleField-yJztI6Ts.js → ParticleField-tWNicEDO.js} +1 -4
- package/dist/core/{ParticleFlow-DJYrNrb8.js → ParticleFlow-BiEYFyWR.js} +2 -6
- package/dist/core/{Particles-kT-8Aj5V.js → Particles-B7W4yWgo.js} +3 -7
- package/dist/core/{PerlinNoise-C_Pczp28.js → PerlinNoise-C-irUxp9.js} +3 -5
- package/dist/core/{Perspective-BrbfuYVk.js → Perspective-DlnAW-pe.js} +2 -3
- package/dist/core/{PixelSort-DoTMcLz4.js → PixelSort-BBOTYuOE.js} +1 -4
- package/dist/core/{PixelThrow-B8pxI6sI.js → PixelThrow-DCJb9Lxd.js} +2 -4
- package/dist/core/{Pixelate-DCU9U9Wb.js → Pixelate-CZdwB--K.js} +1 -2
- package/dist/core/{Plasma-Xe1I1Mmb.js → Plasma-CTOQJeqy.js} +2 -4
- package/dist/core/{Plastic-Ce9dVqPq.js → Plastic-DvyH9x-4.js} +3 -8
- package/dist/core/{PolarCoordinates-mtOsxdGf.js → PolarCoordinates-XhdDAOD0.js} +1 -2
- package/dist/core/{Polygon-Cv63keGU.js → Polygon-CLohB-Ly.js} +2 -4
- package/dist/core/{Posterize-QhGDzUuf.js → Posterize-BAQfnvmK.js} +1 -2
- package/dist/core/{Prism-DOXMcTrS.js → Prism-DJVCVAXX.js} +2 -6
- package/dist/core/{ProgressiveBlur-sSQrxqcr.js → ProgressiveBlur-Dirva1on.js} +2 -3
- package/dist/core/{RadialGradient-DWTDAQnq.js → RadialGradient-DuSKR8Ds.js} +2 -4
- package/dist/core/{RadialWipe-HfofRhY0.js → RadialWipe-n8tON7x2.js} +2 -3
- package/dist/core/{RandomBars-DspX9Utc.js → RandomBars-BYouiIgQ.js} +2 -3
- package/dist/core/{ReactionDiffusion-GsRfnqUY.js → ReactionDiffusion-CHDd3y2q.js} +2 -5
- package/dist/core/{RectangularCoordinates-DhPRrTPT.js → RectangularCoordinates-CYFfCawa.js} +1 -2
- package/dist/core/{ReflectivePlane-ej7XTkZ-.js → ReflectivePlane-DFTl5U9q.js} +2 -3
- package/dist/core/Repeater-CnbzXuAe.js +473 -0
- package/dist/core/{Ring-CC1LC05E.js → Ring-CGkHVSVd.js} +1 -2
- package/dist/core/{RippleWipe-CmmIx59a.js → RippleWipe-DLjPzY6u.js} +2 -3
- package/dist/core/{Ripples-ColS9_ej.js → Ripples-C2tITU62.js} +2 -3
- package/dist/core/{RoundedRect-BCL_4FLA.js → RoundedRect-sfNTUaCY.js} +1 -2
- package/dist/core/{Saturation-E77lSl0T.js → Saturation-BRkifYWj.js} +1 -3
- package/dist/core/{Scratches-ZHohp7K4.js → Scratches-D87O5C2K.js} +2 -4
- package/dist/core/{Sharpness-CgNxIvCA.js → Sharpness-BGv613Zw.js} +1 -3
- package/dist/core/Shatter-DuyCFU1f.js +328 -0
- package/dist/core/{SimplexNoise-CZf812YP.js → SimplexNoise-CQJvmqd-.js} +2 -4
- package/dist/core/{SineWave-CVHPlsdX.js → SineWave-BfOgSGMP.js} +2 -3
- package/dist/core/{SliceWipe-4Y_DLO0N.js → SliceWipe-CD_D99sl.js} +1 -2
- package/dist/core/{Smoke-CzjvGgBl.js → Smoke-BDQYKRP1.js} +2 -4
- package/dist/core/{SmokeFill-DkMjXE-D.js → SmokeFill-CPnzQtQv.js} +3 -8
- package/dist/core/{SmokeFlow-DQMNHV2s.js → SmokeFlow-BkPMjZq8.js} +2 -4
- package/dist/core/{Solarize-DmhOkKoO.js → Solarize-DSiS32QS.js} +1 -3
- package/dist/core/{SolidColor-CyYoqgG3.js → SolidColor-DEKpgy1c.js} +2 -3
- package/dist/core/Sparkle-BZur6gPW.js +178 -0
- package/dist/core/{Spherize-D2gNetxE.js → Spherize-D9Yg4n6O.js} +2 -3
- package/dist/core/{Spiral-BCO6OJXU.js → Spiral-BCacfEpT.js} +2 -3
- package/dist/core/{Star-9JERbdHT.js → Star-Dnw1ihk7.js} +1 -2
- package/dist/core/{Stone-92McvPwz.js → Stone-Cje-_vAg.js} +1 -3
- package/dist/core/{Strands-B6NfRExJ.js → Strands-CFRxS1G_.js} +2 -4
- package/dist/core/{Stretch-DbUOkCav.js → Stretch-DXVhfIqO.js} +1 -2
- package/dist/core/{Stripes-BG2zbwGV.js → Stripes-CCADWwyq.js} +2 -3
- package/dist/core/{StudioBackground-tpZpD080.js → StudioBackground-BlzYNAsu.js} +2 -6
- package/dist/core/{SunBurst-BMH4MKRL.js → SunBurst-CmWbI18r.js} +2 -3
- package/dist/core/{Surface3D-DUZMTBel.js → Surface3D-Dmh98-0V.js} +2 -6
- package/dist/core/{Swirl-CzOPAKx8.js → Swirl-CzI1qSVc.js} +2 -4
- package/dist/core/{Teardrop-aOr2VYQI.js → Teardrop-D24uulL0.js} +1 -2
- package/dist/core/{Text-CV3Lr3m0.js → Text-CrZKvBw6.js} +2 -6
- package/dist/core/{ThinFilm-CYOodpsx.js → ThinFilm-D7R2dt1O.js} +3 -6
- package/dist/core/{TiltShift-Cv80ZHW3.js → TiltShift-AMMDZBvf.js} +2 -3
- package/dist/core/{TimeTrail-fvJO2a1q.js → TimeTrail-BCYDP2ep.js} +2 -6
- package/dist/core/{Tint-D4m85tFF.js → Tint-DHb5wBN5.js} +2 -3
- package/dist/core/{Trapezoid-B-PkXCCJ.js → Trapezoid-CL5Fxvq7.js} +1 -2
- package/dist/core/{TriangularGrid-hMfK10up.js → TriangularGrid-Bp-SJS-H.js} +2 -3
- package/dist/core/{Tritone-n1wNQ1dI.js → Tritone-C0nx7OdC.js} +2 -3
- package/dist/core/{Truchet-BhmcbIE9.js → Truchet-DCetyDaq.js} +2 -3
- package/dist/core/{Twirl-D8gALHXr.js → Twirl-D_mv9KEi.js} +1 -2
- package/dist/core/{VHS-CaqSB2Op.js → VHS-Cp9aDjti.js} +1 -2
- package/dist/core/{VenetianBlinds-B1-WjIeY.js → VenetianBlinds-DUyvaT5w.js} +2 -3
- package/dist/core/{Vesica-Gh1CMA7n.js → Vesica-BpzrTPTA.js} +1 -2
- package/dist/core/{Vibrance-ixBSdj4B.js → Vibrance-DW3J-pvW.js} +1 -3
- package/dist/core/{VideoTexture-DVQ1YsW2.js → VideoTexture-zoKsSrex.js} +1 -2
- package/dist/core/{Vignette-B9v8l0So.js → Vignette-KKbP3qdZ.js} +2 -5
- package/dist/core/{Voronoi-CIHogO9V.js → Voronoi-Bp2-U6lm.js} +2 -5
- package/dist/core/Voxels-B3e3LHH5.js +469 -0
- package/dist/core/{Water-Dh4UB4UF.js → Water-CoYwvqKx.js} +3 -8
- package/dist/core/{Watercolor-C70_K8Lv.js → Watercolor-DUNjSIN1.js} +2 -4
- package/dist/core/{WaveDistortion-BCKxUa-p.js → WaveDistortion-Dp8ws0z1.js} +1 -2
- package/dist/core/{Waveform-BKMFhH8R.js → Waveform-DDBLB6zu.js} +2 -9
- package/dist/core/{WaveletNoise-CFpncHiR.js → WaveletNoise-CpBkzfRT.js} +2 -4
- package/dist/core/{Weave-CYgbepeB.js → Weave-cWkvSEAy.js} +2 -3
- package/dist/core/{WebcamTexture-B0vkMk_l.js → WebcamTexture-D484SXSE.js} +1 -2
- package/dist/core/{Wool-CLkJUMng.js → Wool-C9L7O9fD.js} +1 -3
- package/dist/core/{WorleyNoise-BxznxOxV.js → WorleyNoise-B5j5lDQZ.js} +2 -3
- package/dist/core/{ZoomBlur-DtujxMsW.js → ZoomBlur-bPC1dBu2.js} +2 -3
- package/dist/core/customShaders.d.ts +71 -0
- package/dist/core/customShaders.d.ts.map +1 -0
- package/dist/core/docs-manifest.json +29177 -0
- package/dist/core/gpu/composer.d.ts +2 -0
- package/dist/core/gpu/composer.d.ts.map +1 -1
- package/dist/core/gpu/contract.d.ts +15 -0
- package/dist/core/gpu/contract.d.ts.map +1 -1
- package/dist/core/gpu/frame.d.ts +5 -2
- package/dist/core/gpu/frame.d.ts.map +1 -1
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/gpu/kit/waves.d.ts +6 -0
- package/dist/core/gpu/kit/waves.d.ts.map +1 -1
- package/dist/core/gpu/scaffolds/sdfShape.d.ts +1 -1
- package/dist/core/gpu/scaffolds/sdfShape.d.ts.map +1 -1
- package/dist/core/gpu/support.d.ts +12 -0
- package/dist/core/gpu/support.d.ts.map +1 -1
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +238 -255
- package/dist/core/llms.txt +1558 -0
- package/dist/core/{noiseColor-_P7nIu_L.js → noiseColor-D_bPhJ4m.js} +2 -2
- package/dist/core/presetRenderer.d.ts +4 -0
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +204 -248
- package/dist/core/shaderRegistry-BaozBFyh.js +445 -0
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.d.ts +1 -1
- package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +4 -10
- package/dist/core/shaders/Arc/index.js +4 -6
- package/dist/core/shaders/Ascii/index.d.ts +1 -1
- package/dist/core/shaders/Ascii/index.d.ts.map +1 -1
- package/dist/core/shaders/Ascii/index.js +4 -11
- package/dist/core/shaders/Aurora/index.js +4 -21
- package/dist/core/shaders/BarShift/index.js +4 -8
- package/dist/core/shaders/BarnDoors/index.js +4 -7
- package/dist/core/shaders/Beam/index.js +4 -11
- package/dist/core/shaders/Bend/index.js +4 -8
- package/dist/core/shaders/Blob/index.js +4 -18
- package/dist/core/shaders/BlockDissolve/index.js +4 -7
- package/dist/core/shaders/BlockNoise/index.d.ts +1 -1
- package/dist/core/shaders/BlockNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/BlockNoise/index.js +5 -14
- package/dist/core/shaders/BlueNoise/index.d.ts +1 -1
- package/dist/core/shaders/BlueNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/BlueNoise/index.js +5 -14
- package/dist/core/shaders/Blur/index.d.ts +1 -1
- package/dist/core/shaders/Blur/index.d.ts.map +1 -1
- package/dist/core/shaders/Blur/index.js +4 -10
- package/dist/core/shaders/Boids/index.js +4 -9
- package/dist/core/shaders/BokehBlur/index.js +4 -10
- package/dist/core/shaders/BrickPattern/index.d.ts +1 -1
- package/dist/core/shaders/BrickPattern/index.d.ts.map +1 -1
- package/dist/core/shaders/BrickPattern/index.js +4 -13
- package/dist/core/shaders/BrightnessContrast/index.js +4 -7
- package/dist/core/shaders/BrushedMetal/index.js +4 -11
- package/dist/core/shaders/Bulge/index.js +4 -8
- package/dist/core/shaders/CRTScreen/index.d.ts +2 -2
- package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
- package/dist/core/shaders/CRTScreen/index.js +4 -10
- package/dist/core/shaders/CarbonFiber/index.js +4 -11
- package/dist/core/shaders/Chalkboard/index.d.ts +1 -1
- package/dist/core/shaders/Chalkboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Chalkboard/index.js +4 -9
- package/dist/core/shaders/ChannelBlur/index.d.ts +1 -1
- package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +4 -10
- package/dist/core/shaders/CheckerWipe/index.js +4 -7
- package/dist/core/shaders/Checkerboard/index.d.ts +1 -1
- package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Checkerboard/index.js +4 -13
- package/dist/core/shaders/Chevron/index.d.ts +1 -1
- package/dist/core/shaders/Chevron/index.d.ts.map +1 -1
- package/dist/core/shaders/Chevron/index.js +4 -13
- package/dist/core/shaders/ChromaFlow/index.js +4 -8
- package/dist/core/shaders/ChromaticAberration/index.js +4 -11
- package/dist/core/shaders/Chrome/index.js +4 -10
- package/dist/core/shaders/Circle/index.js +4 -6
- package/dist/core/shaders/ColorWheel/index.js +4 -11
- package/dist/core/shaders/CompressionArtifacts/index.js +4 -7
- package/dist/core/shaders/ConcentricSpin/index.js +4 -8
- package/dist/core/shaders/ConicGradient/index.js +4 -11
- package/dist/core/shaders/ContourLines/index.js +4 -6
- package/dist/core/shaders/CornerPin/index.js +4 -8
- package/dist/core/shaders/Crescent/index.js +4 -5
- package/dist/core/shaders/Cross/index.js +4 -5
- package/dist/core/shaders/Crystal/index.js +4 -11
- package/dist/core/shaders/CurlNoise/index.d.ts +1 -1
- package/dist/core/shaders/CurlNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/CurlNoise/index.js +5 -14
- package/dist/core/shaders/CursorRipples/index.js +4 -7
- package/dist/core/shaders/CursorTrail/index.js +4 -7
- package/dist/core/shaders/DataMosh/index.js +4 -7
- package/dist/core/shaders/DiamondGradient/index.js +4 -11
- package/dist/core/shaders/DiamondWipe/index.js +4 -7
- package/dist/core/shaders/DiffuseBlur/index.d.ts +1 -1
- package/dist/core/shaders/DiffuseBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +4 -10
- package/dist/core/shaders/DisplacementMap/index.js +4 -8
- package/dist/core/shaders/Dither/index.d.ts +1 -1
- package/dist/core/shaders/Dither/index.d.ts.map +1 -1
- package/dist/core/shaders/Dither/index.js +4 -13
- package/dist/core/shaders/DotGrid/index.d.ts +2 -2
- package/dist/core/shaders/DotGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/DotGrid/index.js +4 -13
- package/dist/core/shaders/DropShadow/index.d.ts +1 -1
- package/dist/core/shaders/DropShadow/index.d.ts.map +1 -1
- package/dist/core/shaders/DropShadow/index.js +4 -10
- package/dist/core/shaders/Duotone/index.js +4 -6
- package/dist/core/shaders/Ellipse/index.js +4 -5
- package/dist/core/shaders/Emboss/index.js +4 -9
- package/dist/core/shaders/Engraving/index.js +4 -9
- package/dist/core/shaders/ErosionNoise/index.d.ts +1 -1
- package/dist/core/shaders/ErosionNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/ErosionNoise/index.js +5 -14
- package/dist/core/shaders/Exposure/index.js +4 -7
- package/dist/core/shaders/FallingLines/index.d.ts +1 -1
- package/dist/core/shaders/FallingLines/index.d.ts.map +1 -1
- package/dist/core/shaders/FallingLines/index.js +4 -13
- package/dist/core/shaders/FilmGrain/index.js +4 -7
- package/dist/core/shaders/FilmStock/index.js +4 -13
- package/dist/core/shaders/Flip/index.js +4 -8
- package/dist/core/shaders/FloatingParticles/index.d.ts +1 -1
- package/dist/core/shaders/FloatingParticles/index.d.ts.map +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +4 -9
- package/dist/core/shaders/FlowField/index.js +4 -8
- package/dist/core/shaders/Flower/index.js +4 -5
- package/dist/core/shaders/FlowingGradient/index.js +4 -15
- package/dist/core/shaders/FlutedGlass/index.js +4 -11
- package/dist/core/shaders/Fog/index.js +4 -7
- package/dist/core/shaders/Form3D/index.js +4 -7
- package/dist/core/shaders/FractalNoise/index.d.ts +1 -1
- package/dist/core/shaders/FractalNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/FractalNoise/index.js +4 -13
- package/dist/core/shaders/Frost/index.js +4 -11
- package/dist/core/shaders/GaborNoise/index.d.ts +2 -2
- package/dist/core/shaders/GaborNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/GaborNoise/index.js +5 -14
- package/dist/core/shaders/Glass/index.js +4 -11
- package/dist/core/shaders/GlassTiles/index.d.ts +1 -1
- package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
- package/dist/core/shaders/GlassTiles/index.js +4 -8
- package/dist/core/shaders/Glitch/index.d.ts +1 -1
- package/dist/core/shaders/Glitch/index.d.ts.map +1 -1
- package/dist/core/shaders/Glitch/index.js +4 -10
- package/dist/core/shaders/Glow/index.d.ts +1 -1
- package/dist/core/shaders/Glow/index.d.ts.map +1 -1
- package/dist/core/shaders/Glow/index.js +4 -11
- package/dist/core/shaders/Godrays/index.js +4 -12
- package/dist/core/shaders/Goo/index.js +4 -11
- package/dist/core/shaders/GradientMap/index.js +4 -7
- package/dist/core/shaders/Grayscale/index.js +4 -6
- package/dist/core/shaders/Grid/index.d.ts +2 -2
- package/dist/core/shaders/Grid/index.d.ts.map +1 -1
- package/dist/core/shaders/Grid/index.js +4 -13
- package/dist/core/shaders/GridDistortion/index.js +4 -11
- package/dist/core/shaders/Group/index.js +4 -6
- package/dist/core/shaders/HTMLInCanvas/index.js +4 -7
- package/dist/core/shaders/Halftone/index.d.ts +1 -1
- package/dist/core/shaders/Halftone/index.d.ts.map +1 -1
- package/dist/core/shaders/Halftone/index.js +4 -13
- package/dist/core/shaders/Heart/index.js +4 -5
- package/dist/core/shaders/Heatmap/index.js +4 -11
- package/dist/core/shaders/HexGrid/index.d.ts +2 -2
- package/dist/core/shaders/HexGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/HexGrid/index.js +4 -13
- package/dist/core/shaders/Hologram/index.js +4 -10
- package/dist/core/shaders/Holographic/index.js +4 -10
- package/dist/core/shaders/HueShift/index.js +4 -7
- package/dist/core/shaders/ImageTexture/index.js +4 -6
- package/dist/core/shaders/InkFlow/index.js +4 -8
- package/dist/core/shaders/Invert/index.js +4 -6
- package/dist/core/shaders/IrisWipe/index.js +4 -7
- package/dist/core/shaders/Irradiance/index.js +4 -13
- package/dist/core/shaders/IsometricCubes/index.d.ts +1 -1
- package/dist/core/shaders/IsometricCubes/index.d.ts.map +1 -1
- package/dist/core/shaders/IsometricCubes/index.js +4 -13
- package/dist/core/shaders/Kaleidoscope/index.js +4 -8
- package/dist/core/shaders/KeyFrames/index.js +4 -10
- package/dist/core/shaders/LensDistortion/index.js +4 -6
- package/dist/core/shaders/LensFlare/index.d.ts +1 -1
- package/dist/core/shaders/LensFlare/index.d.ts.map +1 -1
- package/dist/core/shaders/LensFlare/index.js +4 -12
- package/dist/core/shaders/LightEdge/index.js +4 -10
- package/dist/core/shaders/LightLeak/index.js +4 -12
- package/dist/core/shaders/Line/index.js +4 -10
- package/dist/core/shaders/LinearBlur/index.d.ts +1 -1
- package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearBlur/index.js +4 -10
- package/dist/core/shaders/LinearGradient/index.js +4 -11
- package/dist/core/shaders/LinearWipe/index.js +4 -7
- package/dist/core/shaders/LiquidMetal/index.js +4 -11
- package/dist/core/shaders/Liquify/index.js +4 -10
- package/dist/core/shaders/MagneticFilings/index.js +4 -9
- package/dist/core/shaders/Marble/index.d.ts +1 -1
- package/dist/core/shaders/Marble/index.d.ts.map +1 -1
- package/dist/core/shaders/Marble/index.js +4 -15
- package/dist/core/shaders/MeshGradient/index.js +4 -17
- package/dist/core/shaders/Mirror/index.js +4 -8
- package/dist/core/shaders/MultiPointGradient/index.js +4 -11
- package/dist/core/shaders/Nebula/index.js +4 -13
- package/dist/core/shaders/Neon/index.js +4 -9
- package/dist/core/shaders/NoiseDissolve/index.js +4 -7
- package/dist/core/shaders/ObjectTracker/index.js +4 -10
- package/dist/core/shaders/Obsidian/index.js +4 -15
- package/dist/core/shaders/PagePeel/index.js +4 -10
- package/dist/core/shaders/Paper/index.d.ts +1 -1
- package/dist/core/shaders/Paper/index.d.ts.map +1 -1
- package/dist/core/shaders/Paper/index.js +4 -8
- package/dist/core/shaders/Parallelogram/index.js +4 -5
- package/dist/core/shaders/ParticleField/index.js +4 -9
- package/dist/core/shaders/ParticleFlow/index.js +4 -10
- package/dist/core/shaders/Particles/index.js +4 -9
- package/dist/core/shaders/PerlinNoise/index.d.ts +2 -2
- package/dist/core/shaders/PerlinNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/PerlinNoise/index.js +5 -14
- package/dist/core/shaders/Perspective/index.js +4 -8
- package/dist/core/shaders/PixelSort/index.js +4 -8
- package/dist/core/shaders/PixelThrow/index.js +4 -8
- package/dist/core/shaders/Pixelate/index.d.ts +1 -1
- package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
- package/dist/core/shaders/Pixelate/index.js +4 -10
- package/dist/core/shaders/Plasma/index.js +4 -11
- package/dist/core/shaders/Plastic/index.js +4 -11
- package/dist/core/shaders/PolarCoordinates/index.js +4 -8
- package/dist/core/shaders/Polygon/index.js +4 -6
- package/dist/core/shaders/Posterize/index.js +4 -6
- package/dist/core/shaders/Prism/index.js +4 -12
- package/dist/core/shaders/ProgressiveBlur/index.d.ts +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +4 -10
- package/dist/core/shaders/RadialGradient/index.js +4 -11
- package/dist/core/shaders/RadialWipe/index.js +4 -7
- package/dist/core/shaders/RandomBars/index.js +4 -7
- package/dist/core/shaders/ReactionDiffusion/index.js +4 -8
- package/dist/core/shaders/RectangularCoordinates/index.js +4 -8
- package/dist/core/shaders/ReflectivePlane/index.js +4 -10
- package/dist/core/shaders/Repeater/index.js +4 -5
- package/dist/core/shaders/Ring/index.js +4 -5
- package/dist/core/shaders/RippleWipe/index.js +4 -7
- package/dist/core/shaders/Ripples/index.d.ts +1 -1
- package/dist/core/shaders/Ripples/index.d.ts.map +1 -1
- package/dist/core/shaders/Ripples/index.js +4 -13
- package/dist/core/shaders/RoundedRect/index.js +4 -5
- package/dist/core/shaders/Saturation/index.js +4 -7
- package/dist/core/shaders/Scratches/index.d.ts +1 -1
- package/dist/core/shaders/Scratches/index.d.ts.map +1 -1
- package/dist/core/shaders/Scratches/index.js +5 -14
- package/dist/core/shaders/Sharpness/index.d.ts +1 -1
- package/dist/core/shaders/Sharpness/index.d.ts.map +1 -1
- package/dist/core/shaders/Sharpness/index.js +4 -11
- package/dist/core/shaders/Shatter/index.js +4 -6
- package/dist/core/shaders/SimplexNoise/index.d.ts +1 -1
- package/dist/core/shaders/SimplexNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +5 -14
- package/dist/core/shaders/SineWave/index.js +4 -10
- package/dist/core/shaders/SliceWipe/index.js +4 -8
- package/dist/core/shaders/Smoke/index.js +4 -7
- package/dist/core/shaders/SmokeFill/index.js +4 -10
- package/dist/core/shaders/SmokeFlow/index.js +4 -7
- package/dist/core/shaders/Solarize/index.js +4 -7
- package/dist/core/shaders/SolidColor/index.js +4 -11
- package/dist/core/shaders/Sparkle/index.d.ts +57 -0
- package/dist/core/shaders/Sparkle/index.d.ts.map +1 -0
- package/dist/core/shaders/Sparkle/index.js +5 -0
- package/dist/core/shaders/Spherize/index.d.ts +1 -1
- package/dist/core/shaders/Spherize/index.d.ts.map +1 -1
- package/dist/core/shaders/Spherize/index.js +4 -10
- package/dist/core/shaders/Spiral/index.js +4 -11
- package/dist/core/shaders/Star/index.js +4 -5
- package/dist/core/shaders/Stone/index.d.ts +1 -1
- package/dist/core/shaders/Stone/index.d.ts.map +1 -1
- package/dist/core/shaders/Stone/index.js +4 -14
- package/dist/core/shaders/Strands/index.d.ts +1 -1
- package/dist/core/shaders/Strands/index.d.ts.map +1 -1
- package/dist/core/shaders/Strands/index.js +4 -13
- package/dist/core/shaders/Stretch/index.js +4 -8
- package/dist/core/shaders/Stripes/index.d.ts +1 -1
- package/dist/core/shaders/Stripes/index.d.ts.map +1 -1
- package/dist/core/shaders/Stripes/index.js +4 -13
- package/dist/core/shaders/StudioBackground/index.js +4 -14
- package/dist/core/shaders/SunBurst/index.js +4 -12
- package/dist/core/shaders/Surface3D/index.js +4 -8
- package/dist/core/shaders/Swirl/index.js +4 -11
- package/dist/core/shaders/Teardrop/index.js +4 -5
- package/dist/core/shaders/Text/index.js +4 -12
- package/dist/core/shaders/ThinFilm/index.js +4 -9
- package/dist/core/shaders/TiltShift/index.d.ts +1 -1
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +4 -10
- package/dist/core/shaders/TimeTrail/index.js +4 -8
- package/dist/core/shaders/Tint/index.js +4 -6
- package/dist/core/shaders/Trapezoid/index.js +4 -5
- package/dist/core/shaders/TriangularGrid/index.d.ts +1 -1
- package/dist/core/shaders/TriangularGrid/index.d.ts.map +1 -1
- package/dist/core/shaders/TriangularGrid/index.js +4 -13
- package/dist/core/shaders/Tritone/index.js +4 -6
- package/dist/core/shaders/Truchet/index.d.ts +1 -1
- package/dist/core/shaders/Truchet/index.d.ts.map +1 -1
- package/dist/core/shaders/Truchet/index.js +4 -13
- package/dist/core/shaders/Twirl/index.js +4 -8
- package/dist/core/shaders/VHS/index.d.ts +1 -1
- package/dist/core/shaders/VHS/index.d.ts.map +1 -1
- package/dist/core/shaders/VHS/index.js +4 -10
- package/dist/core/shaders/VenetianBlinds/index.js +4 -7
- package/dist/core/shaders/Vesica/index.js +4 -5
- package/dist/core/shaders/Vibrance/index.js +4 -7
- package/dist/core/shaders/VideoTexture/index.js +4 -6
- package/dist/core/shaders/Vignette/index.js +4 -8
- package/dist/core/shaders/Voronoi/index.d.ts +1 -1
- package/dist/core/shaders/Voronoi/index.d.ts.map +1 -1
- package/dist/core/shaders/Voronoi/index.js +4 -13
- package/dist/core/shaders/Voxels/index.js +4 -14
- package/dist/core/shaders/Water/index.js +4 -11
- package/dist/core/shaders/Watercolor/index.d.ts +1 -1
- package/dist/core/shaders/Watercolor/index.d.ts.map +1 -1
- package/dist/core/shaders/Watercolor/index.js +4 -10
- package/dist/core/shaders/WaveDistortion/index.js +4 -8
- package/dist/core/shaders/Waveform/index.js +4 -16
- package/dist/core/shaders/WaveletNoise/index.d.ts +1 -1
- package/dist/core/shaders/WaveletNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/WaveletNoise/index.js +5 -14
- package/dist/core/shaders/Weave/index.d.ts +1 -1
- package/dist/core/shaders/Weave/index.d.ts.map +1 -1
- package/dist/core/shaders/Weave/index.js +4 -13
- package/dist/core/shaders/WebcamTexture/index.js +4 -6
- package/dist/core/shaders/Wool/index.d.ts +1 -1
- package/dist/core/shaders/Wool/index.d.ts.map +1 -1
- package/dist/core/shaders/Wool/index.js +4 -14
- package/dist/core/shaders/WorleyNoise/index.d.ts +1 -1
- package/dist/core/shaders/WorleyNoise/index.d.ts.map +1 -1
- package/dist/core/shaders/WorleyNoise/index.js +4 -13
- package/dist/core/shaders/ZoomBlur/index.d.ts +1 -1
- package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +4 -10
- package/dist/core/std/effects/blurs.d.ts +656 -138
- package/dist/core/std/effects/blurs.d.ts.map +1 -1
- package/dist/core/std/effects/color.d.ts +209 -32
- package/dist/core/std/effects/color.d.ts.map +1 -1
- package/dist/core/std/effects/edgeGlow.d.ts +86 -17
- package/dist/core/std/effects/edgeGlow.d.ts.map +1 -1
- package/dist/core/std/effects/fracture.d.ts +72 -8
- package/dist/core/std/effects/fracture.d.ts.map +1 -1
- package/dist/core/std/effects/index.d.ts +15 -0
- package/dist/core/std/effects/index.d.ts.map +1 -0
- package/dist/core/std/effects/instances.d.ts +87 -8
- package/dist/core/std/effects/instances.d.ts.map +1 -1
- package/dist/core/std/effects/lens.d.ts +48 -12
- package/dist/core/std/effects/lens.d.ts.map +1 -1
- package/dist/core/std/effects/overlay.d.ts +63 -22
- package/dist/core/std/effects/overlay.d.ts.map +1 -1
- package/dist/core/std/effects/pointerFields.d.ts +45 -20
- package/dist/core/std/effects/pointerFields.d.ts.map +1 -1
- package/dist/core/std/effects/reveal.d.ts +118 -40
- package/dist/core/std/effects/reveal.d.ts.map +1 -1
- package/dist/core/std/effects/stylize.d.ts +139 -70
- package/dist/core/std/effects/stylize.d.ts.map +1 -1
- package/dist/core/std/filter.d.ts +72 -12
- package/dist/core/std/filter.d.ts.map +1 -1
- package/dist/core/std/frames.d.ts +91 -24
- package/dist/core/std/frames.d.ts.map +1 -1
- package/dist/core/std/index.d.ts +46 -8
- package/dist/core/std/index.d.ts.map +1 -1
- package/dist/core/std/index.js +4 -0
- package/dist/core/std/invoke.d.ts +107 -12
- package/dist/core/std/invoke.d.ts.map +1 -1
- package/dist/core/std/lists.d.ts +40 -10
- package/dist/core/std/lists.d.ts.map +1 -1
- package/dist/core/std/lower.d.ts +73 -1
- package/dist/core/std/lower.d.ts.map +1 -1
- package/dist/core/std/mask.d.ts +60 -17
- package/dist/core/std/mask.d.ts.map +1 -1
- package/dist/core/std/math.d.ts +484 -9
- package/dist/core/std/math.d.ts.map +1 -1
- package/dist/core/std/motion.d.ts +130 -10
- package/dist/core/std/motion.d.ts.map +1 -1
- package/dist/core/std/paint/compose.d.ts +57 -16
- package/dist/core/std/paint/compose.d.ts.map +1 -1
- package/dist/core/std/paint/fields.d.ts +376 -93
- package/dist/core/std/paint/fields.d.ts.map +1 -1
- package/dist/core/std/paint/figures.d.ts +32 -17
- package/dist/core/std/paint/figures.d.ts.map +1 -1
- package/dist/core/std/paint/gradients.d.ts +58 -25
- package/dist/core/std/paint/gradients.d.ts.map +1 -1
- package/dist/core/std/paint/light.d.ts +501 -77
- package/dist/core/std/paint/light.d.ts.map +1 -1
- package/dist/core/std/paint/materials.d.ts +678 -151
- package/dist/core/std/paint/materials.d.ts.map +1 -1
- package/dist/core/std/paint/media.d.ts +47 -32
- package/dist/core/std/paint/media.d.ts.map +1 -1
- package/dist/core/std/paint/noise.d.ts +436 -87
- package/dist/core/std/paint/noise.d.ts.map +1 -1
- package/dist/core/std/paint/patterns.d.ts +473 -91
- package/dist/core/std/paint/patterns.d.ts.map +1 -1
- package/dist/core/std/paint/radiance.d.ts +75 -29
- package/dist/core/std/paint/radiance.d.ts.map +1 -1
- package/dist/core/std/paint/volume.d.ts +68 -27
- package/dist/core/std/paint/volume.d.ts.map +1 -1
- package/dist/core/std/paint/voxels.d.ts +46 -26
- package/dist/core/std/paint/voxels.d.ts.map +1 -1
- package/dist/core/std/shape.d.ts +195 -1
- package/dist/core/std/shape.d.ts.map +1 -1
- package/dist/core/std/signal.d.ts +55 -15
- package/dist/core/std/signal.d.ts.map +1 -1
- package/dist/core/std/sim/agentForces.d.ts +441 -99
- package/dist/core/std/sim/agentForces.d.ts.map +1 -1
- package/dist/core/std/sim/agentFrame.d.ts +94 -20
- package/dist/core/std/sim/agentFrame.d.ts.map +1 -1
- package/dist/core/std/sim/agentRender.d.ts +187 -60
- package/dist/core/std/sim/agentRender.d.ts.map +1 -1
- package/dist/core/std/sim/agents.d.ts +99 -28
- package/dist/core/std/sim/agents.d.ts.map +1 -1
- package/dist/core/std/sim/feedback.d.ts +40 -19
- package/dist/core/std/sim/feedback.d.ts.map +1 -1
- package/dist/core/std/sim/fluids.d.ts +127 -63
- package/dist/core/std/sim/fluids.d.ts.map +1 -1
- package/dist/core/std/sim/grids.d.ts +200 -48
- package/dist/core/std/sim/grids.d.ts.map +1 -1
- package/dist/core/std/sim/index.d.ts +14 -0
- package/dist/core/std/sim/index.d.ts.map +1 -0
- package/dist/core/std/sim/shapeFields.d.ts +56 -0
- package/dist/core/std/sim/shapeFields.d.ts.map +1 -1
- package/dist/core/std/sim.d.ts +112 -10
- package/dist/core/std/sim.d.ts.map +1 -1
- package/dist/core/std/slots.d.ts +72 -6
- package/dist/core/std/slots.d.ts.map +1 -1
- package/dist/core/std/types.d.ts +97 -60
- package/dist/core/std/types.d.ts.map +1 -1
- package/dist/core/std/values.d.ts +33 -14
- package/dist/core/std/values.d.ts.map +1 -1
- package/dist/core/std/warps.d.ts +221 -76
- package/dist/core/std/warps.d.ts.map +1 -1
- package/dist/core/std/wgsl.d.ts +115 -0
- package/dist/core/std/wgsl.d.ts.map +1 -0
- package/dist/core/std-ClftfWpF.js +218889 -0
- package/dist/core/{support-GJphyuEe.js → support-D3W86vgR.js} +11 -1
- package/dist/core/telemetry/index.js +1 -1
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +182 -180
- package/dist/js/createShader.d.ts.map +1 -1
- package/dist/js/createShader.js +4 -3
- package/dist/js/types.d.ts +5 -0
- package/dist/js/types.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.js +35 -22
- package/dist/react/CustomShader.js +178 -0
- package/dist/react/Preview.js +1 -0
- package/dist/react/Shader.js +1 -1
- package/dist/react/Sparkle.js +226 -0
- package/dist/react/bundle.js +178 -176
- package/dist/react/components/Sparkle.d.ts +41 -0
- package/dist/react/components/Sparkle.d.ts.map +1 -0
- package/dist/react/engine/CustomShader.d.ts +37 -0
- package/dist/react/engine/CustomShader.d.ts.map +1 -0
- package/dist/react/engine/Preview.d.ts.map +1 -1
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +4 -2
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +35 -22
- package/dist/registry.js +310 -58
- package/dist/solid/components/Sparkle.d.ts +38 -0
- package/dist/solid/components/Sparkle.d.ts.map +1 -0
- package/dist/solid/components/Sparkle.js +232 -0
- package/dist/solid/engine/CustomShader.d.ts +35 -0
- package/dist/solid/engine/CustomShader.d.ts.map +1 -0
- package/dist/solid/engine/CustomShader.js +160 -0
- package/dist/solid/engine/Preview.d.ts.map +1 -1
- package/dist/solid/engine/Preview.js +319 -317
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/solid/index.d.ts +5 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +95 -86
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +35 -22
- package/dist/svelte/components/Sparkle.svelte.d.ts +28 -0
- package/dist/svelte/engine/CustomShader.svelte.d.ts +40 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.js +1237 -877
- package/dist/svelte/source/components/Sparkle.svelte +352 -0
- package/dist/svelte/source/engine/CustomShader.svelte +216 -0
- package/dist/svelte/source/engine/Preview.svelte +5 -3
- package/dist/svelte/source/index.js +4 -0
- package/dist/svelte/utils/generatePresetCode.js +35 -22
- package/dist/vue/CustomShader.js +3 -0
- package/dist/vue/CustomShader.vue_vue_type_script_setup_true_lang.js +173 -0
- package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/vue/Sparkle.js +3 -0
- package/dist/vue/Sparkle.vue_vue_type_script_setup_true_lang.js +233 -0
- package/dist/vue/components/Sparkle.vue.d.ts +63 -0
- package/dist/vue/components/Sparkle.vue.d.ts.map +1 -0
- package/dist/vue/index.d.ts +4 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +4 -2
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +35 -22
- package/package.json +27 -2
- package/dist/core/Irradiance-DtC4tqNu.js +0 -4191
- package/dist/core/LightEdge-BV9bO8YB.js +0 -2339
- package/dist/core/Repeater-DU_EhoxD.js +0 -762
- package/dist/core/Shatter-DYKKCVD8.js +0 -1479
- package/dist/core/Voxels-LEG0c9YC.js +0 -8547
- package/dist/core/agents-CdLlm-5E.js +0 -5357
- package/dist/core/agents-DZaZ4n9_.js +0 -15709
- package/dist/core/blur-CrEChFnm.js +0 -8015
- package/dist/core/blurs-D5a6ad3o.js +0 -1751
- package/dist/core/canvasRaster-DDBkrdY8.js +0 -80
- package/dist/core/color-CY5teMWa.js +0 -3619
- package/dist/core/compose-DNU_Ut36.js +0 -46
- package/dist/core/device-m0ud8-Fn.js +0 -10
- package/dist/core/feedback-yfT0pT6A.js +0 -46
- package/dist/core/fields-CXwmEUsd.js +0 -475
- package/dist/core/figures-BRYcB-p2.js +0 -48
- package/dist/core/filter-BrhpSs3Z.js +0 -23
- package/dist/core/fluids-CBhAiGAx.js +0 -226
- package/dist/core/fonts-BUXTd9qb.js +0 -59
- package/dist/core/frames-Clw8-BpA.js +0 -78
- package/dist/core/glass-DIEus1UY.js +0 -2532
- package/dist/core/gradientPaints-Cx2bT20T.js +0 -6564
- package/dist/core/gradients-C15o7_xy.js +0 -159
- package/dist/core/grids-Cv99xcJg.js +0 -151
- package/dist/core/lens-ChO_HVpe.js +0 -352
- package/dist/core/light-Bba_Pie_.js +0 -271
- package/dist/core/lightfields-D120ZvMt.js +0 -2255
- package/dist/core/lower-DtoDQ7hV.js +0 -49452
- package/dist/core/mask-6rnSCir2.js +0 -28
- package/dist/core/materials-BjsiWqS0.js +0 -2944
- package/dist/core/math-7PlusTFx.js +0 -56
- package/dist/core/media-CgWmWvGq.js +0 -832
- package/dist/core/mediaLifecycle-BTPb5i1-.js +0 -320
- package/dist/core/motionBlur-DzaHMq9p.js +0 -6766
- package/dist/core/noise-G7a5U0ar.js +0 -546
- package/dist/core/noisePaints-B_axPpuv.js +0 -3619
- package/dist/core/noiseStylize-CUrW_HiC.js +0 -65
- package/dist/core/overlay-W4DAsSzP.js +0 -4712
- package/dist/core/patterns-RTt6Fek8.js +0 -9723
- package/dist/core/pointerFields-Ch_-cbCV.js +0 -2339
- package/dist/core/porters-CQwDd2t4.js +0 -30201
- package/dist/core/reveal-dbBiS7gE.js +0 -1688
- package/dist/core/sdf3d-BMqCSSPB.js +0 -21082
- package/dist/core/shaderRegistry-Bs0XOv9A.js +0 -443
- package/dist/core/shape-B2CoDi6l.js +0 -20
- package/dist/core/shapePaints-7HrXeLYX.js +0 -3354
- package/dist/core/signal-emJuvOI3.js +0 -34
- package/dist/core/slots-BqIef2iV.js +0 -32
- package/dist/core/stylize-CiN0ZaMu.js +0 -4541
- package/dist/core/tone-CsRho9qb.js +0 -763
- package/dist/core/warpMaps-Dbuleg2M.js +0 -10773
- package/dist/core/warps-gIr3RmZV.js +0 -276
- /package/dist/core/{transformations-CzFmhZww.js → transformations-P50Uo_Ju.js} +0 -0
|
@@ -3,29 +3,69 @@ import { RttFilterParams } from '../../gpu/scaffolds/rttFilter';
|
|
|
3
3
|
import { GatherEffect } from '../types';
|
|
4
4
|
import { PropRef } from '../values';
|
|
5
5
|
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* A pattern value: something you place in `paint:` or hand to another pattern word, yielding
|
|
8
|
+
* a color or a mask per pixel.
|
|
9
|
+
*/
|
|
7
10
|
export type PatternPaint = (params: GpuFragmentParams) => Expr;
|
|
8
|
-
/** What a
|
|
11
|
+
/** What a pattern slot accepts: a prop `p('name')` or another pattern value. */
|
|
9
12
|
export type PaintSlot = PropRef | PatternPaint;
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
14
|
+
* Which way a lattice's rows and rotation run.
|
|
15
|
+
*
|
|
16
|
+
* `'flippedY'` counts rows up from the bottom and rotates counter-clockwise (grids,
|
|
17
|
+
* triangles). `'clockwise'` counts rows down from the top and rotates clockwise (hexagons,
|
|
18
|
+
* truchet, cubes). `'plain'` counts down from the top and rotates counter-clockwise (weave).
|
|
19
|
+
* Use the one named in the line word's example; the others still work but shift the look.
|
|
15
20
|
*/
|
|
16
21
|
export type CellFrameConvention = 'flippedY' | 'clockwise' | 'plain';
|
|
17
22
|
/**
|
|
18
|
-
* The
|
|
19
|
-
*
|
|
23
|
+
* The shared coordinate system of a tiled pattern: how many cells fit down the canvas
|
|
24
|
+
* height and how far the whole lattice is rotated.
|
|
25
|
+
*
|
|
26
|
+
* `cells` counts cells along the canvas height, so cells stay square as the canvas resizes.
|
|
27
|
+
* `rotation` is in degrees about the canvas centre. Pass the result as the `frame` of
|
|
28
|
+
* `gridLines`, `hexLines`, `triangleLines`, `truchetArcs`, `weaveThreads` or `isoCubeFaces`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const field = gridLines({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'flippedY'}), thickness: p('thickness'), softness: p('softness'), variation: p('variation')})
|
|
33
|
+
* ```
|
|
34
|
+
* @tip One frame can feed several line words. It is evaluated once however many read it.
|
|
35
|
+
* @see gridLines, hexLines, triangleLines, truchetArcs, weaveThreads, isoCubeFaces
|
|
20
36
|
*/
|
|
21
37
|
export declare function cellFrame(slots: {
|
|
22
38
|
cells: PropRef;
|
|
23
39
|
rotation: PropRef;
|
|
24
40
|
convention: CellFrameConvention;
|
|
25
41
|
}): PatternPaint;
|
|
26
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* A color lightened or darkened per cell by a shade factor, alpha untouched.
|
|
44
|
+
*
|
|
45
|
+
* `factor` is the `shade` output of a lattice word: 1 keeps the color, above 1 brightens,
|
|
46
|
+
* below 1 darkens. Use it on the cell fill so every tile reads slightly different.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* paint: strokeOver({fill: vary(p('cellColor'), field.shade), stroke: p('color'), mask: field.lines, space: p('colorSpace')})
|
|
51
|
+
* ```
|
|
52
|
+
* @see gridLines, hexLines, brickCourses, strokeOver
|
|
53
|
+
*/
|
|
27
54
|
export declare function vary(color: PaintSlot, factor: PaintSlot): PatternPaint;
|
|
28
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Two colors mixed through a mask: `fill` where the mask is 0, `stroke` where it is 1.
|
|
57
|
+
*
|
|
58
|
+
* The everyday way to color a pattern. `space` is a color-space prop (`'linear'`, `'oklch'`,
|
|
59
|
+
* `'oklab'`, `'hsl'`, `'hsv'`, `'lch'`); leave it out for a linear mix. Alpha interpolates
|
|
60
|
+
* too, so a transparent fill gives a lines-only pattern.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: checkerCells({cells: p('cells'), softness: p('softness')}), space: p('colorSpace')})
|
|
65
|
+
* ```
|
|
66
|
+
* @tip The `space` prop must be `compileTime: true`. Changing it recompiles the shader.
|
|
67
|
+
* @see withAlpha, mixOf, vary
|
|
68
|
+
*/
|
|
29
69
|
export declare function strokeOver(layers: {
|
|
30
70
|
fill: PaintSlot;
|
|
31
71
|
stroke: PaintSlot;
|
|
@@ -33,41 +73,176 @@ export declare function strokeOver(layers: {
|
|
|
33
73
|
space?: PropRef;
|
|
34
74
|
}): PatternPaint;
|
|
35
75
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
76
|
+
* Makes map-driven props change per whole cell instead of per pixel, so a mapped dot size or
|
|
77
|
+
* line thickness grows cell by cell rather than being cut off mid-cell.
|
|
78
|
+
*
|
|
79
|
+
* Set it on the definition's `mapSampleUVs` field, not in `paint:`. Give it the same `cells`
|
|
80
|
+
* count and `rotation` (degrees) the pattern uses so the snapping matches the lattice.
|
|
81
|
+
* `props` lists the prop names to snap.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* mapSampleUVs: sampleMapsAtCellCentres({cells: p('cells'), rotation: p('rotation'), props: ['thickness', 'softness']})
|
|
86
|
+
* ```
|
|
87
|
+
* @tip Only matters when a prop is driven by a map (an image or another layer). Plain values are unaffected.
|
|
88
|
+
* @see cellFrame, dotLattice, gridLines
|
|
41
89
|
*/
|
|
42
90
|
export declare function sampleMapsAtCellCentres(slots: {
|
|
43
91
|
cells: PropRef;
|
|
44
92
|
rotation?: PropRef;
|
|
45
93
|
props: string[];
|
|
46
94
|
}): GpuMapSampleUVs;
|
|
47
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* One random point in each cell of a square grid: the classic scatter for glitter, stars,
|
|
97
|
+
* dust and sparkles.
|
|
98
|
+
*
|
|
99
|
+
* `coord` is the pixel's position in any unit (CSS pixels via `uv × logicalViewportSize`
|
|
100
|
+
* keeps the spacing steady across screens); `cellSize` is the grid spacing in that unit.
|
|
101
|
+
* `jitter` is how far the point wanders from the cell's centre, 0 (dead centre) to 1 (anywhere
|
|
102
|
+
* in the cell). `seed` re-rolls every point. Returns the cell's `point` and this pixel's
|
|
103
|
+
* `offset` from it (both in `coord`'s unit), plus `random`, three independent 0–1 values for
|
|
104
|
+
* the cell (`.x` and `.y` already place the point; use `.z` and the others to vary brightness,
|
|
105
|
+
* timing or size).
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const {offset, random} = scatterPoint(px, {cellSize: 30, jitter: 0.6, seed: params.uniforms.seed})
|
|
110
|
+
* ```
|
|
111
|
+
* @tip A pixel only sees its own cell's point, so keep anything drawn around it smaller than
|
|
112
|
+
* half a cell or it gets clipped at the cell edge. Use `scatterPoints` for larger shapes.
|
|
113
|
+
* @see scatterPoints, cellFrame, pointStars
|
|
114
|
+
*/
|
|
115
|
+
export declare function scatterPoint(coord: Expr, opts: ScatterOptions): ScatteredPoint;
|
|
116
|
+
/**
|
|
117
|
+
* The scattered points of the four grid cells nearest the pixel, so anything drawn up to half
|
|
118
|
+
* a cell from its point shows whole, never clipped at a cell edge.
|
|
119
|
+
*
|
|
120
|
+
* Same options and same points as `scatterPoint` (one random point per cell); returns four of
|
|
121
|
+
* them instead of one. Draw something around each and add the results. Costs four times
|
|
122
|
+
* `scatterPoint`.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* const glints = scatterPoints(px, {cellSize: 60, jitter: 0.6, seed: params.uniforms.seed})
|
|
127
|
+
* .map(({offset}) => starGlint(offset, {core: 0.9, rayLength: 0.1, rayWidth: 1.6, rays: 0.25, reach: 30}))
|
|
128
|
+
* ```
|
|
129
|
+
* @tip Pair with `starGlint`'s `reach` set to half the cell size, so a glint has faded out
|
|
130
|
+
* before it could reach a cell this pixel doesn't look at.
|
|
131
|
+
* @see scatterPoint, starGlint
|
|
132
|
+
*/
|
|
133
|
+
export declare function scatterPoints(coord: Expr, opts: ScatterOptions): ScatteredPoint[];
|
|
134
|
+
/** What `scatterPoint` and `scatterPoints` take. */
|
|
135
|
+
export interface ScatterOptions {
|
|
136
|
+
cellSize: Expr | number;
|
|
137
|
+
jitter: Expr | number;
|
|
138
|
+
seed: Expr | number;
|
|
139
|
+
}
|
|
140
|
+
/** One scattered point: where it sits, the pixel's offset from it, and three random 0–1 values for its cell. */
|
|
141
|
+
export interface ScatteredPoint {
|
|
142
|
+
point: Expr;
|
|
143
|
+
offset: Expr;
|
|
144
|
+
random: Expr;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A color with its alpha replaced by a separately built mask.
|
|
148
|
+
*
|
|
149
|
+
* The usual way to hang a pattern under one color: the mask becomes the coverage and the
|
|
150
|
+
* color's own alpha is dropped.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* paint: withAlpha(p('color'), dotLattice({density: p('density'), dotSize: p('dotSize'), offset: p('offset'), speedVariance: p('speedVariance'), twinkle: p('twinkle')}))
|
|
155
|
+
* ```
|
|
156
|
+
* @tip To keep the color's own alpha as well, multiply it in: `withAlpha(color, times(alphaOf(color), mask))`.
|
|
157
|
+
* @see alphaOf, times, opaque
|
|
158
|
+
*/
|
|
48
159
|
export declare function withAlpha(color: PaintSlot, alpha: PaintSlot): PatternPaint;
|
|
49
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* The alpha channel of a color, as a number per pixel.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* paint: withAlpha(streakColor, times(alphaOf(streakColor), streaks.mask))
|
|
166
|
+
* ```
|
|
167
|
+
* @see rgbOf, withAlpha
|
|
168
|
+
*/
|
|
50
169
|
export declare function alphaOf(color: PaintSlot): PatternPaint;
|
|
51
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* The RGB channels of a color, without its alpha.
|
|
172
|
+
*
|
|
173
|
+
* Finish it with `opaque` or `withAlpha` to make a color again.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```ts
|
|
177
|
+
* paint: opaque(mixOf(times(rgbOf(cubeColor), faces.tone), rgbOf(p('lineColor')), faces.wire))
|
|
178
|
+
* ```
|
|
179
|
+
* @see alphaOf, opaque
|
|
180
|
+
*/
|
|
52
181
|
export declare function rgbOf(color: PaintSlot): PatternPaint;
|
|
53
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* The product of two values: a mask scaled by a prop, an RGB dimmed by a shade, two masks
|
|
184
|
+
* combined.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* mask: times(faces.random, p('colorVariation'))
|
|
189
|
+
* ```
|
|
190
|
+
* @see mixOf, vary
|
|
191
|
+
*/
|
|
54
192
|
export declare function times(a: PaintSlot, b: PaintSlot): PatternPaint;
|
|
55
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* A straight blend from one value to another by an amount from 0 to 1.
|
|
195
|
+
*
|
|
196
|
+
* Works on colors, RGB and single numbers alike, channel by channel with no color-space
|
|
197
|
+
* handling. For a color mix in a chosen color space use `strokeOver`.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* mixOf(alphaOf(p('colorA')), alphaOf(p('colorB')), bands)
|
|
202
|
+
* ```
|
|
203
|
+
* @see strokeOver, times
|
|
204
|
+
*/
|
|
56
205
|
export declare function mixOf(from: PaintSlot, to: PaintSlot, amount: PaintSlot): PatternPaint;
|
|
57
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* An RGB value finished as a fully opaque color.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* ```ts
|
|
211
|
+
* paint: opaque(mixOf(times(rgbOf(cubeColor), faces.tone), rgbOf(p('lineColor')), faces.wire))
|
|
212
|
+
* ```
|
|
213
|
+
* @see rgbOf, withAlpha
|
|
214
|
+
*/
|
|
58
215
|
export declare function opaque(rgb: PaintSlot): PatternPaint;
|
|
59
216
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
217
|
+
* A checkerboard mask: 1 on one set of squares, 0 on the other, with clean edges at any size.
|
|
218
|
+
*
|
|
219
|
+
* `cells` counts squares along the canvas height (squares stay square as the canvas
|
|
220
|
+
* resizes). `softness` 0–1 blurs the edges; 0 is crisp. Color it with `strokeOver`.
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```ts
|
|
224
|
+
* paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: checkerCells({cells: p('cells'), softness: p('softness')}), space: p('colorSpace')})
|
|
225
|
+
* ```
|
|
226
|
+
* @tip Stays sharp inside a distortion, which makes it a good test pattern for warps.
|
|
227
|
+
* @see stripeBands, gridLines, strokeOver
|
|
62
228
|
*/
|
|
63
229
|
export declare function checkerCells(slots: {
|
|
64
230
|
cells: PropRef;
|
|
65
231
|
softness: PropRef;
|
|
66
232
|
}): PatternPaint;
|
|
67
233
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* `
|
|
234
|
+
* A mask of straight parallel stripes that scroll with the layer's clock.
|
|
235
|
+
*
|
|
236
|
+
* `angle` is in degrees. `density` is the number of stripe pairs across the canvas height.
|
|
237
|
+
* `balance` 0–1 is how much of each pair is the 0 side (the fill in `strokeOver`).
|
|
238
|
+
* `softness` 0–1 blurs the edges. `offset` shifts the phase; 1 is one whole pair. Declare
|
|
239
|
+
* `animatedTime: {speed: 'speed'}` on the definition; speed 0 holds the stripes still.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```ts
|
|
243
|
+
* paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: stripeBands({angle: p('angle'), density: p('density'), balance: p('balance'), softness: p('softness'), offset: p('offset')}), space: p('colorSpace')})
|
|
244
|
+
* ```
|
|
245
|
+
* @see zigzagBands, checkerCells, ringWaves
|
|
71
246
|
*/
|
|
72
247
|
export declare function stripeBands(slots: {
|
|
73
248
|
angle: PropRef;
|
|
@@ -77,8 +252,18 @@ export declare function stripeBands(slots: {
|
|
|
77
252
|
offset: PropRef;
|
|
78
253
|
}): PatternPaint;
|
|
79
254
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
255
|
+
* A mask of chevron (zigzag) stripes that scroll with the layer's clock.
|
|
256
|
+
*
|
|
257
|
+
* `count` is the number of stripe pairs across the canvas. `angle` is in degrees. `balance`
|
|
258
|
+
* 0–1 is how much of each pair is the 0 side. `softness` 0–1 blurs the edges. `offset` shifts
|
|
259
|
+
* the phase; 1 is one whole pair. Declare `animatedTime: {speed: 'speed'}` on the definition.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```ts
|
|
263
|
+
* const bands = zigzagBands({count: p('count'), angle: p('angle'), balance: p('balance'), softness: p('softness'), offset: p('offset')})
|
|
264
|
+
* ```
|
|
265
|
+
* @tip Reuse one `bands` value for both the color mix and an alpha mix. It is evaluated once.
|
|
266
|
+
* @see stripeBands, checkerCells
|
|
82
267
|
*/
|
|
83
268
|
export declare function zigzagBands(slots: {
|
|
84
269
|
count: PropRef;
|
|
@@ -88,8 +273,19 @@ export declare function zigzagBands(slots: {
|
|
|
88
273
|
offset: PropRef;
|
|
89
274
|
}): PatternPaint;
|
|
90
275
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
276
|
+
* A mask of concentric rings spreading out from a point, animated by the layer's clock.
|
|
277
|
+
*
|
|
278
|
+
* `center` is a position prop. `frequency` sets how tightly the rings pack; higher is more
|
|
279
|
+
* rings. `thickness` 0–1 is how much of each ring period is ring (0.5 is even bands, 1 is
|
|
280
|
+
* solid). `softness` 0–3 blurs the ring edges. `phase` is in radians. Declare
|
|
281
|
+
* `animatedTime: {speed: 'speed'}` on the definition; positive speed moves the rings outward.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```ts
|
|
285
|
+
* paint: strokeOver({fill: p('colorB'), stroke: p('colorA'), mask: ringWaves({center: p('center'), frequency: p('frequency'), thickness: p('thickness'), softness: p('softness'), phase: p('phase')})})
|
|
286
|
+
* ```
|
|
287
|
+
* @tip Keep `softness` above 0. At exactly 0 the edge is an undefined hard step rather than a crisp one.
|
|
288
|
+
* @see stripeBands, dotLattice
|
|
93
289
|
*/
|
|
94
290
|
export declare function ringWaves(slots: {
|
|
95
291
|
center: PropRef;
|
|
@@ -99,9 +295,23 @@ export declare function ringWaves(slots: {
|
|
|
99
295
|
phase: PropRef;
|
|
100
296
|
}): PatternPaint;
|
|
101
297
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
298
|
+
* Streaks that fall across the canvas in columns, each column at its own random speed.
|
|
299
|
+
*
|
|
300
|
+
* Returns two values: `mask` is the streak coverage, and `fade` runs from 0 at the tail to 1
|
|
301
|
+
* at the leading edge, for a color ramp along each streak. `angle` is in degrees (90 falls
|
|
302
|
+
* down, 0 moves right). `density` is the number of columns across the canvas.
|
|
303
|
+
* `speedVariance` 0–1 spreads the per-column speeds. `trailLength` 0–1 is the streak length
|
|
304
|
+
* as a fraction of the spacing. `strokeWidth` 0–1 is the width as a fraction of a column.
|
|
305
|
+
* `rounding` 0–1 rounds the leading cap. `balance` 0–1 moves the midpoint of `fade`. Declare
|
|
306
|
+
* `animatedTime: {speed: 'speed'}` on the definition.
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```ts
|
|
310
|
+
* const streaks = fallingStreaks({angle: p('angle'), density: p('density'), speedVariance: p('speedVariance'), trailLength: p('trailLength'), strokeWidth: p('strokeWidth'), rounding: p('rounding'), balance: p('balance')})
|
|
311
|
+
* const streakColor = strokeOver({fill: p('trailColor'), stroke: p('leadColor'), mask: streaks.fade, space: p('colorSpace')})
|
|
312
|
+
* // paint: withAlpha(streakColor, times(alphaOf(streakColor), streaks.mask))
|
|
313
|
+
* ```
|
|
314
|
+
* @see stripeBands, dotLattice, withAlpha
|
|
105
315
|
*/
|
|
106
316
|
export declare function fallingStreaks(slots: {
|
|
107
317
|
angle: PropRef;
|
|
@@ -116,9 +326,20 @@ export declare function fallingStreaks(slots: {
|
|
|
116
326
|
fade: PatternPaint;
|
|
117
327
|
};
|
|
118
328
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
329
|
+
* A mask of round dots on a square grid, with optional row stagger, drift and twinkle.
|
|
330
|
+
*
|
|
331
|
+
* `density` counts dots along the canvas height. `dotSize` 0–1 is the dot diameter as a
|
|
332
|
+
* fraction of a cell; 1 touches the neighbours. `offset` 0–1 shifts every other row (0.5 is
|
|
333
|
+
* the polka-dot stagger). `speedVariance` 0–1 gives rows different drift speeds. `twinkle`
|
|
334
|
+
* 0–1 pulses each dot on its own phase. Declare `animatedTime: {speed: 'speed'}` on the
|
|
335
|
+
* definition; the drift follows that clock while the twinkle keeps running at speed 0.
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```ts
|
|
339
|
+
* paint: withAlpha(p('color'), dotLattice({density: p('density'), dotSize: p('dotSize'), offset: p('offset'), speedVariance: p('speedVariance'), twinkle: p('twinkle')}))
|
|
340
|
+
* ```
|
|
341
|
+
* @tip Add `sampleMapsAtCellCentres` when `dotSize` or `twinkle` is map-driven, so dots grow whole instead of being clipped.
|
|
342
|
+
* @see sampleMapsAtCellCentres, gridLines, ringWaves
|
|
122
343
|
*/
|
|
123
344
|
export declare function dotLattice(slots: {
|
|
124
345
|
density: PropRef;
|
|
@@ -128,8 +349,20 @@ export declare function dotLattice(slots: {
|
|
|
128
349
|
twinkle: PropRef;
|
|
129
350
|
}): PatternPaint;
|
|
130
351
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
352
|
+
* Square grid lines drawn in a `cellFrame`, plus a per-cell shade for the fill.
|
|
353
|
+
*
|
|
354
|
+
* Returns `lines` (1 on a line, 0 inside a cell) and `shade` (a brightness factor around 1
|
|
355
|
+
* for `vary`). `thickness` 1 draws lines about 2% of a cell wide; 0 draws none. `softness`
|
|
356
|
+
* 0–1 blurs the lines. `variation` 0–1 sets how far `shade` strays from 1. Draw it with the
|
|
357
|
+
* `'flippedY'` convention.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```ts
|
|
361
|
+
* const field = gridLines({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'flippedY'}), thickness: p('thickness'), softness: p('softness'), variation: p('variation')})
|
|
362
|
+
* // paint: strokeOver({fill: vary(p('cellColor'), field.shade), stroke: p('color'), mask: field.lines, space: p('colorSpace')})
|
|
363
|
+
* ```
|
|
364
|
+
* @tip Rotate the frame 45 degrees for a diamond crosshatch.
|
|
365
|
+
* @see cellFrame, hexLines, triangleLines, vary
|
|
133
366
|
*/
|
|
134
367
|
export declare function gridLines(slots: {
|
|
135
368
|
frame: PatternPaint;
|
|
@@ -141,8 +374,18 @@ export declare function gridLines(slots: {
|
|
|
141
374
|
shade: PatternPaint;
|
|
142
375
|
};
|
|
143
376
|
/**
|
|
144
|
-
* Honeycomb lines
|
|
145
|
-
*
|
|
377
|
+
* Honeycomb lines (pointy-top hexagons) drawn in a `cellFrame`, plus a per-cell shade.
|
|
378
|
+
*
|
|
379
|
+
* Returns `lines` (1 on a line) and `shade` (a brightness factor around 1 for `vary`).
|
|
380
|
+
* `thickness` 1 draws lines about 2% of a cell wide; 0 draws none. `softness` 0–1 blurs the
|
|
381
|
+
* lines. `variation` 0–1 sets how far `shade` strays from 1. Draw it with the `'clockwise'`
|
|
382
|
+
* convention.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```ts
|
|
386
|
+
* const field = hexLines({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness'), variation: p('variation')})
|
|
387
|
+
* ```
|
|
388
|
+
* @see cellFrame, gridLines, isoCubeFaces, vary
|
|
146
389
|
*/
|
|
147
390
|
export declare function hexLines(slots: {
|
|
148
391
|
frame: PatternPaint;
|
|
@@ -154,9 +397,19 @@ export declare function hexLines(slots: {
|
|
|
154
397
|
shade: PatternPaint;
|
|
155
398
|
};
|
|
156
399
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
400
|
+
* A lattice of equilateral triangles drawn in a `cellFrame`, with rows that can drift.
|
|
401
|
+
*
|
|
402
|
+
* Returns `lines` (1 on a line) and `shade` (a brightness factor around 1 per triangle for
|
|
403
|
+
* `vary`). `thickness` 1 draws lines about 4% of a cell wide; 0 draws none. `softness` 0–1
|
|
404
|
+
* blurs the lines. `variation` 0–1 sets how far `shade` strays from 1. `speedVariance` 0–1
|
|
405
|
+
* gives rows different drift speeds. Declare `animatedTime: {speed: 'speed'}` on the
|
|
406
|
+
* definition; speed 0 holds still. Draw it with the `'flippedY'` convention.
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* ```ts
|
|
410
|
+
* const field = triangleLines({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'flippedY'}), thickness: p('thickness'), softness: p('softness'), variation: p('variation'), speedVariance: p('speedVariance')})
|
|
411
|
+
* ```
|
|
412
|
+
* @see cellFrame, gridLines, hexLines, vary
|
|
160
413
|
*/
|
|
161
414
|
export declare function triangleLines(slots: {
|
|
162
415
|
frame: PatternPaint;
|
|
@@ -169,12 +422,23 @@ export declare function triangleLines(slots: {
|
|
|
169
422
|
shade: PatternPaint;
|
|
170
423
|
};
|
|
171
424
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* `
|
|
425
|
+
* A brick wall: staggered rows with mortar gaps, optional rotation and per-row drift.
|
|
426
|
+
*
|
|
427
|
+
* Returns `bricks` (1 on a brick, 0 in the mortar) and `shade` (a brightness factor around 1
|
|
428
|
+
* per brick for `vary`). `cellsX` is bricks per row across the canvas width and `cellsY` the
|
|
429
|
+
* number of rows down its height. `mortar` 0–1 widens the gaps (1 is 30% of a brick), equal
|
|
430
|
+
* in pixels both ways. `softness` 0–1 blurs the edges. `variation` 0–1 sets how far `shade`
|
|
431
|
+
* strays from 1. `rotation` is in degrees. `offset` slides the rows; 1 is one brick.
|
|
432
|
+
* `speedVariance` 0–1 and `seed` randomise the per-row drift. Declare
|
|
433
|
+
* `animatedTime: {speed: 'speed'}` on the definition. It brings its own frame, so there is
|
|
434
|
+
* no `frame` slot.
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* ```ts
|
|
438
|
+
* const field = brickCourses({cellsX: p('cellsX'), cellsY: p('cellsY'), mortar: p('mortar'), softness: p('softness'), variation: p('variation'), rotation: p('rotation'), offset: p('offset'), speedVariance: p('speedVariance'), seed: p('seed')})
|
|
439
|
+
* // paint: strokeOver({fill: p('colorMortar'), stroke: vary(p('colorBrick'), field.shade), mask: field.bricks, space: p('colorSpace')})
|
|
440
|
+
* ```
|
|
441
|
+
* @see gridLines, cellFrame, vary
|
|
178
442
|
*/
|
|
179
443
|
export declare function brickCourses(slots: {
|
|
180
444
|
cellsX: PropRef;
|
|
@@ -191,8 +455,18 @@ export declare function brickCourses(slots: {
|
|
|
191
455
|
shade: PatternPaint;
|
|
192
456
|
};
|
|
193
457
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
458
|
+
* A maze of quarter-circle arcs, two per tile, flipped at random so they join into flowing
|
|
459
|
+
* curves.
|
|
460
|
+
*
|
|
461
|
+
* Returns the arc mask (1 on an arc). `thickness` 2 draws arcs about 2% of a tile wide; 0
|
|
462
|
+
* draws none. `softness` 0–1 blurs the edges. `seed` picks a different set of flips. Draw it
|
|
463
|
+
* in a `'clockwise'` `cellFrame`.
|
|
464
|
+
*
|
|
465
|
+
* @example
|
|
466
|
+
* ```ts
|
|
467
|
+
* paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: truchetArcs({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness'), seed: p('seed')}), space: p('colorSpace')})
|
|
468
|
+
* ```
|
|
469
|
+
* @see cellFrame, gridLines, weaveThreads
|
|
196
470
|
*/
|
|
197
471
|
export declare function truchetArcs(slots: {
|
|
198
472
|
frame: PatternPaint;
|
|
@@ -201,9 +475,17 @@ export declare function truchetArcs(slots: {
|
|
|
201
475
|
seed: PropRef;
|
|
202
476
|
}): PatternPaint;
|
|
203
477
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
478
|
+
* Two sets of threads woven over and under each other, returned as a finished color.
|
|
479
|
+
*
|
|
480
|
+
* `gap` 0–0.5 is the empty margin on each side of a thread, as a fraction of a cell; 0 packs
|
|
481
|
+
* them tight. `colors` is `[horizontal, vertical]`. The gaps are transparent, so this goes
|
|
482
|
+
* straight into `paint:`. Draw it in a `'plain'` `cellFrame`.
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* ```ts
|
|
486
|
+
* paint: weaveThreads({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'plain'}), gap: p('gap'), colors: [p('colorA'), p('colorB')]})
|
|
487
|
+
* ```
|
|
488
|
+
* @see cellFrame, gridLines, truchetArcs
|
|
207
489
|
*/
|
|
208
490
|
export declare function weaveThreads(slots: {
|
|
209
491
|
frame: PatternPaint;
|
|
@@ -212,9 +494,20 @@ export declare function weaveThreads(slots: {
|
|
|
212
494
|
colors: [PropRef, PropRef];
|
|
213
495
|
}): PatternPaint;
|
|
214
496
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
497
|
+
* Tumbling blocks: three shaded rhombus faces per hexagon that read as a field of 3D cubes.
|
|
498
|
+
*
|
|
499
|
+
* Returns three values. `tone` is the face shading (1 on top, 0.74 on the right, 0.5 on the
|
|
500
|
+
* left) to multiply into the cube color. `random` is a 0–1 value per cube for varying cube
|
|
501
|
+
* colors. `wire` is the edge-line mask (1 on an edge). `thickness` 1 draws edges about 4% of
|
|
502
|
+
* a cell wide; 0 draws none. `softness` 0–1 blurs them. Draw it in a `'clockwise'`
|
|
503
|
+
* `cellFrame`.
|
|
504
|
+
*
|
|
505
|
+
* @example
|
|
506
|
+
* ```ts
|
|
507
|
+
* const faces = isoCubeFaces({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness')})
|
|
508
|
+
* // paint: opaque(mixOf(times(rgbOf(cubeColor), faces.tone), rgbOf(p('lineColor')), faces.wire))
|
|
509
|
+
* ```
|
|
510
|
+
* @see cellFrame, hexLines, times, opaque
|
|
218
511
|
*/
|
|
219
512
|
export declare function isoCubeFaces(slots: {
|
|
220
513
|
frame: PatternPaint;
|
|
@@ -226,37 +519,92 @@ export declare function isoCubeFaces(slots: {
|
|
|
226
519
|
wire: PatternPaint;
|
|
227
520
|
};
|
|
228
521
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
522
|
+
* The dot coverage of one halftone screen: 1 inside a dot, 0 between, with the dot size set
|
|
523
|
+
* by an ink amount.
|
|
524
|
+
*
|
|
525
|
+
* A raw building block for a custom press inside a gather `build`. `uv` is the pixel's uv
|
|
526
|
+
* and `aspect` the canvas aspect (`ctx.uv`, `ctx.aspect`). `angle` is the screen angle in
|
|
527
|
+
* degrees. `intensity` 0–1 is the ink amount at this pixel; 0 leaves no dot. `frequency` is
|
|
528
|
+
* the number of dots down the canvas height.
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* ```ts
|
|
532
|
+
* const dots = dotScreenMask(ctx.uv, ctx.aspect, uniforms.angle, intensity, uniforms.frequency)
|
|
533
|
+
* ```
|
|
534
|
+
* @see inkTransmission, cmykPress, dotScreen
|
|
232
535
|
*/
|
|
233
536
|
export declare function dotScreenMask(uv: Expr, aspect: Expr, angle: Expr, intensity: Expr, frequency: Expr): Expr;
|
|
234
537
|
/**
|
|
235
|
-
*
|
|
236
|
-
*
|
|
538
|
+
* How much light passes one ink plate: white where the dot mask is 0, the ink color where
|
|
539
|
+
* it is 1.
|
|
540
|
+
*
|
|
541
|
+
* Returns RGB. Multiply the plates together over a paper color to lay the inks down in
|
|
542
|
+
* order. The ink's alpha scales its strength.
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* ```ts
|
|
546
|
+
* printed = printed.mul(inkTransmission(uniforms.cyanColor, dotScreenMask(ctx.uv, ctx.aspect, uniforms.cyanAngle, cyan, uniforms.frequency)))
|
|
547
|
+
* ```
|
|
548
|
+
* @see dotScreenMask, cmykPress
|
|
237
549
|
*/
|
|
238
550
|
export declare function inkTransmission(inkColor: Expr, inkMask: Expr): Expr;
|
|
239
551
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
552
|
+
* A classic halftone filter: the layer inside it redrawn as a grid of dots that grow where
|
|
553
|
+
* it is bright.
|
|
554
|
+
*
|
|
555
|
+
* Goes in `effect:`. `angle` is the screen angle in degrees (45 is the print default).
|
|
556
|
+
* `frequency` is the number of dots down the canvas height. The dots keep the child's own
|
|
557
|
+
* color; between dots the output is transparent.
|
|
558
|
+
*
|
|
559
|
+
* @example
|
|
560
|
+
* ```ts
|
|
561
|
+
* effect: dotScreen({angle: p('angle'), frequency: p('frequency')})
|
|
562
|
+
* ```
|
|
563
|
+
* @see cmykPress, chosenBy, quantise
|
|
242
564
|
*/
|
|
243
565
|
export declare function dotScreen(slots: {
|
|
244
566
|
angle: PropRef;
|
|
245
567
|
frequency: PropRef;
|
|
246
568
|
}): GatherEffect;
|
|
247
|
-
/**
|
|
569
|
+
/**
|
|
570
|
+
* One ink plate of a `cmykPress`: which channel it prints, its screen-angle prop (degrees)
|
|
571
|
+
* and its ink-color prop.
|
|
572
|
+
*/
|
|
248
573
|
export interface InkPlateSpec {
|
|
249
574
|
readonly channel: 'cyan' | 'magenta' | 'yellow' | 'black';
|
|
250
575
|
readonly screenAngle: PropRef;
|
|
251
576
|
readonly ink: PropRef;
|
|
252
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* Declares one ink plate for `cmykPress`.
|
|
580
|
+
*
|
|
581
|
+
* `channel` is `'cyan'`, `'magenta'`, `'yellow'` or `'black'`. `screenAngle` is an angle prop
|
|
582
|
+
* in degrees and `ink` a color prop. Plates print in the order you list them.
|
|
583
|
+
*
|
|
584
|
+
* @example
|
|
585
|
+
* ```ts
|
|
586
|
+
* inkPlate({channel: 'cyan', screenAngle: p('cyanAngle'), ink: p('cyanColor')})
|
|
587
|
+
* ```
|
|
588
|
+
* @see cmykPress
|
|
589
|
+
*/
|
|
253
590
|
export declare function inkPlate(spec: InkPlateSpec): InkPlateSpec;
|
|
254
591
|
/**
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
592
|
+
* A four-color print filter: the layer inside it separated into ink plates, each screened
|
|
593
|
+
* into dots at its own angle and laid down on paper in order.
|
|
594
|
+
*
|
|
595
|
+
* Goes in `effect:`. `paper` is the color shown where no ink lands. `frequency` is the number
|
|
596
|
+
* of dots down the canvas height. `misprint` offsets each plate in uv (0 is perfect
|
|
597
|
+
* registration, 0.005 is visible fringing), in a direction that turns a quarter turn per
|
|
598
|
+
* plate starting from `misprintAngle` (degrees). `plates` is a list from `inkPlate`; the
|
|
599
|
+
* standard screen angles are cyan 15, magenta 75, yellow 0, black 45. The result keeps the
|
|
600
|
+
* child's alpha.
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* ```ts
|
|
604
|
+
* effect: cmykPress({paper: p('paperColor'), frequency: p('frequency'), misprint: p('misprint'), misprintAngle: p('misprintAngle'), plates: [inkPlate({channel: 'cyan', screenAngle: p('cyanAngle'), ink: p('cyanColor')}), inkPlate({channel: 'black', screenAngle: p('blackAngle'), ink: p('blackColor')})]})
|
|
605
|
+
* ```
|
|
606
|
+
* @tip Any subset of the four plates works. Two plates give a duotone or risograph look.
|
|
607
|
+
* @see inkPlate, dotScreen, dotScreenMask, inkTransmission
|
|
260
608
|
*/
|
|
261
609
|
export declare function cmykPress(slots: {
|
|
262
610
|
paper: PropRef;
|
|
@@ -266,39 +614,64 @@ export declare function cmykPress(slots: {
|
|
|
266
614
|
plates: InkPlateSpec[];
|
|
267
615
|
}): GatherEffect;
|
|
268
616
|
/**
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
* must
|
|
617
|
+
* Picks one whole effect recipe from a select prop, decided when the shader compiles.
|
|
618
|
+
*
|
|
619
|
+
* `prop` must be a `compileTime: true` prop. `read` turns its raw value into one of the keys
|
|
620
|
+
* of `recipes`; accept both the option string and its transformed value. Every recipe must
|
|
621
|
+
* be a gather effect with the same alpha handling and no setup step, or this throws as soon
|
|
622
|
+
* as it is called.
|
|
623
|
+
*
|
|
624
|
+
* @example
|
|
625
|
+
* ```ts
|
|
626
|
+
* effect: chosenBy(p('style'), (raw) => (raw === 'cmyk' || raw === 1 ? 'cmyk' : 'classic'), {classic: dotScreen({angle: p('angle'), frequency: p('frequency')}), cmyk: cmykPress({paper: p('paperColor'), frequency: p('frequency'), misprint: p('misprint'), misprintAngle: p('misprintAngle'), plates})})
|
|
627
|
+
* ```
|
|
628
|
+
* @tip Changing the prop recompiles the shader, which is the point: each style pays only for its own code.
|
|
629
|
+
* @see dotScreen, cmykPress
|
|
272
630
|
*/
|
|
273
631
|
export declare function chosenBy<K extends string>(prop: PropRef, read: (raw: unknown) => K, recipes: Record<K, GatherEffect>): GatherEffect;
|
|
274
|
-
/**
|
|
632
|
+
/** A value computed per pixel from the layer inside a gather effect, such as a dither level. */
|
|
275
633
|
export type GatherStage = (params: RttFilterParams) => Expr;
|
|
276
634
|
/**
|
|
277
|
-
* The
|
|
278
|
-
*
|
|
279
|
-
* grid is sized against the LOGICAL (authored-frame) resolution so the dot count stays constant
|
|
280
|
-
* under infinite-canvas resolution scaling.
|
|
635
|
+
* The pixel grid a dither works on, from `pixelGrid`: the cell `size` prop, the cell
|
|
636
|
+
* coordinate `coord`, and `source`, the child's color sampled once per cell.
|
|
281
637
|
*/
|
|
282
638
|
export interface PixelGrid {
|
|
283
639
|
readonly size: PropRef;
|
|
284
640
|
readonly coord: GatherStage;
|
|
285
641
|
readonly source: GatherStage;
|
|
286
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* The pixel grid of a dither: the layer inside it chopped into square cells of a given size.
|
|
645
|
+
*
|
|
646
|
+
* `size` is a prop in pixels of the authored frame, so the cell count stays the same when the
|
|
647
|
+
* canvas renders at a higher resolution. Build it once and pass the same grid to `quantise`
|
|
648
|
+
* and `ditherInks`.
|
|
649
|
+
*
|
|
650
|
+
* @example
|
|
651
|
+
* ```ts
|
|
652
|
+
* const grid = pixelGrid({size: p('pixelSize')})
|
|
653
|
+
* ```
|
|
654
|
+
* @see quantise, ditherInks
|
|
655
|
+
*/
|
|
287
656
|
export declare function pixelGrid(slots: {
|
|
288
657
|
size: PropRef;
|
|
289
658
|
}): PixelGrid;
|
|
290
|
-
/**
|
|
291
|
-
* Ordered-dither part: the threshold FIELD for a compile-time pattern mode — the closed-form
|
|
292
|
-
* Bayer 2/4/8 or clustered-dot lattice values, or the blue/white-noise hashes, at the dither
|
|
293
|
-
* cell coordinate. Feed it to `ditherOrderedResult` to quantise a luminance against it.
|
|
294
|
-
* (Floyd–Steinberg is not a threshold field — its quantisation diffuses error serially.)
|
|
295
|
-
*/
|
|
659
|
+
/** @internal */
|
|
296
660
|
export declare function orderedThreshold(pattern: number, coord: Expr): Expr;
|
|
297
661
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
662
|
+
* Reduces each grid cell of the layer inside to 0 or 1 using a dither pattern.
|
|
663
|
+
*
|
|
664
|
+
* Returns a per-pixel level for `ditherInks`. `pattern` is a `compileTime: true` select prop
|
|
665
|
+
* with one of `bayer2`, `bayer4`, `bayer8`, `clusteredDot`, `blueNoise`, `whiteNoise` or
|
|
666
|
+
* `floydSteinberg`. `threshold` 0–1 shifts the cut point; 0.5 is neutral. `spread` 0–1 is
|
|
667
|
+
* how much of the brightness range dithers; lower leaves more solid areas.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* ```ts
|
|
671
|
+
* const levels = quantise({grid, pattern: p('pattern'), threshold: p('threshold'), spread: p('spread')})
|
|
672
|
+
* ```
|
|
673
|
+
* @tip Floyd–Steinberg is the costliest pattern: it re-reads 64 cells per pixel. Bayer 4 is the cheap default.
|
|
674
|
+
* @see pixelGrid, ditherInks
|
|
302
675
|
*/
|
|
303
676
|
export declare function quantise(slots: {
|
|
304
677
|
grid: PixelGrid;
|
|
@@ -307,9 +680,18 @@ export declare function quantise(slots: {
|
|
|
307
680
|
spread: PropRef;
|
|
308
681
|
}): GatherStage;
|
|
309
682
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
683
|
+
* A dither filter: colors the 0/1 levels from `quantise`, either with two colors of your own
|
|
684
|
+
* or with darkened and brightened versions of the layer's own pixels.
|
|
685
|
+
*
|
|
686
|
+
* Goes in `effect:`. `mode` is a `compileTime: true` select prop, `'custom'` or `'source'`.
|
|
687
|
+
* `colors` is `[dark, light]` for custom mode; a transparent dark color lets the background
|
|
688
|
+
* show through.
|
|
689
|
+
*
|
|
690
|
+
* @example
|
|
691
|
+
* ```ts
|
|
692
|
+
* effect: ditherInks({grid, levels: quantise({grid, pattern: p('pattern'), threshold: p('threshold'), spread: p('spread')}), mode: p('colorMode'), colors: [p('colorA'), p('colorB')]})
|
|
693
|
+
* ```
|
|
694
|
+
* @see pixelGrid, quantise, dotScreen
|
|
313
695
|
*/
|
|
314
696
|
export declare function ditherInks(slots: {
|
|
315
697
|
grid: PixelGrid;
|