shaders 3.0.447 → 3.0.449
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/dist/cli.js +2 -2
- package/dist/core/{AngularBlur-xU811GPM.js → AngularBlur-DU1WmNHt.js} +15 -15
- package/dist/core/{Arc-DYvFxtGy.js → Arc-C8QmYsiZ.js} +13 -12
- package/dist/core/{Ascii-ChE4BP7J.js → Ascii-BaQ6MZTc.js} +51 -53
- package/dist/core/{Aurora-BThE6pbb.js → Aurora-B6lOg6M4.js} +63 -68
- package/dist/core/{BarShift-DdjkPSk3.js → BarShift-CFK-CzF9.js} +31 -32
- package/dist/core/{BarnDoors-B_kxVuec.js → BarnDoors-DWs_0xtH.js} +21 -22
- package/dist/core/{Beam-C7zPHuIU.js → Beam-Cgc4EYnj.js} +32 -39
- package/dist/core/{Bend-CFcEjifF.js → Bend-oof5pE1H.js} +27 -28
- package/dist/core/{Blob-CgUolAhz.js → Blob-cfvDCv0i.js} +54 -60
- package/dist/core/{BlockDissolve-CLSxXB4e.js → BlockDissolve-C7yJzYGZ.js} +21 -20
- package/dist/core/{BlockNoise-BgEJOicU.js → BlockNoise-DaM9YDAH.js} +16 -14
- package/dist/core/{BlueNoise-BqMtBLxM.js → BlueNoise-BMMRTsMw.js} +12 -10
- package/dist/core/{Blur-Xaa6jVPT.js → Blur-Be7sX4v9.js} +27 -27
- package/dist/core/{Boids-B8QUNxRL.js → Boids-C9S69THK.js} +151 -149
- package/dist/core/{BokehBlur-B5fql96U.js → BokehBlur-DSkKZ_yy.js} +104 -104
- package/dist/core/{BrickPattern-EAD5HD4e.js → BrickPattern-BY7h4hyx.js} +34 -38
- package/dist/core/{BrightnessContrast-mbv32DkA.js → BrightnessContrast-DFc0gSUv.js} +9 -10
- package/dist/core/{BrushedMetal-B10fDdGt.js → BrushedMetal-B06tUygH.js} +81 -84
- package/dist/core/{Bulge-C1Pq4DHk.js → Bulge-BpSOQfH0.js} +19 -19
- package/dist/core/{CRTScreen-Ctx0Mxtb.js → CRTScreen-DdGcEvk2.js} +35 -37
- package/dist/core/{CarbonFiber-DSSARe6R.js → CarbonFiber-Dy7Osb3V.js} +81 -84
- package/dist/core/{Chalkboard-C7srb54u.js → Chalkboard-wRYj23wL.js} +59 -61
- package/dist/core/{ChannelBlur-DE3T4-pj.js → ChannelBlur-DKD9GUpc.js} +13 -15
- package/dist/core/{CheckerWipe-Dp49-iaT.js → CheckerWipe-D0WmsSKg.js} +23 -23
- package/dist/core/{Checkerboard-oVWtS0rz.js → Checkerboard-2sQYJks9.js} +31 -31
- package/dist/core/{Chevron-CCD5JTRA.js → Chevron-D3oPw2-i.js} +20 -20
- package/dist/core/{ChromaFlow-BiE9Mes0.js → ChromaFlow-px9KG_h6.js} +32 -33
- package/dist/core/{ChromaticAberration-XEasUrD3.js → ChromaticAberration-DLFROPJV.js} +13 -13
- package/dist/core/{Circle-CvQ9duDU.js → Circle-0CqIPN3a.js} +14 -13
- package/dist/core/{ColorWheel-CXvfWAjN.js → ColorWheel-CMtn8slz.js} +30 -34
- package/dist/core/{CompressionArtifacts-BDaP7XI6.js → CompressionArtifacts-D7dpVg47.js} +64 -66
- package/dist/core/{ConcentricSpin-D06hFXEb.js → ConcentricSpin-BPk-_egF.js} +39 -41
- package/dist/core/{ConicGradient-Cg6vy3gl.js → ConicGradient-B-tEhmfR.js} +17 -18
- package/dist/core/{ContourLines-Cg2Dlmcr.js → ContourLines-BlgCWFSy.js} +29 -30
- package/dist/core/{CornerPin-wtqiMUCa.js → CornerPin-DB3G2i_y.js} +55 -57
- package/dist/core/{Crescent-Co__JqEE.js → Crescent-CFzPQKll.js} +14 -13
- package/dist/core/{Cross-CFytbdrZ.js → Cross-Cstl9nDg.js} +14 -13
- package/dist/core/{Crystal-U7VqhbHy.js → Crystal-CEeqF1Xa.js} +143 -152
- package/dist/core/{CurlNoise-BXWYh1Qi.js → CurlNoise-uvTKk4Wa.js} +16 -14
- package/dist/core/{CursorRipples-APbH7SVR.js → CursorRipples-B46VApbY.js} +59 -58
- package/dist/core/{CursorTrail-D5Fj0wGp.js → CursorTrail-DzYRTzzA.js} +72 -71
- package/dist/core/{DataMosh-CWRLpjU3.js → DataMosh-Ysev5-c_.js} +71 -73
- package/dist/core/{DiamondGradient-C_2VoEiQ.js → DiamondGradient-pTOwPuAl.js} +23 -25
- package/dist/core/{DiamondWipe-BkdNODD1.js → DiamondWipe-D6u1P2xH.js} +22 -22
- package/dist/core/{DiffuseBlur-Dl7S4KBW.js → DiffuseBlur-BX0cfwyh.js} +11 -12
- package/dist/core/{DisplacementMap-lv-qoLem.js → DisplacementMap-DMNivtcV.js} +26 -26
- package/dist/core/{Dither-B33J_gJU.js → Dither-Cxu-hSc_.js} +116 -119
- package/dist/core/{DotGrid-DaOhiRaL.js → DotGrid-CbNHebie.js} +37 -39
- package/dist/core/{DropShadow-C5Z2Rs2C.js → DropShadow-DFyuEA17.js} +37 -37
- package/dist/core/{Duotone-x4cywJbU.js → Duotone-CgueO-jZ.js} +7 -7
- package/dist/core/{Ellipse-CrQ1XYjx.js → Ellipse-DxRnSw__.js} +13 -12
- package/dist/core/{Emboss-DNwO5JcE.js → Emboss-BJxzjZmZ.js} +76 -78
- package/dist/core/{Engraving-FsaRQiyI.js → Engraving-DmQCj8vU.js} +57 -59
- package/dist/core/{ErosionNoise-CloHpdFT.js → ErosionNoise-7ekcAfBb.js} +13 -11
- package/dist/core/{Exposure-mO6KjYvc.js → Exposure-avEereLn.js} +4 -5
- package/dist/core/{FallingLines-D_1wHUkx.js → FallingLines-BINyHi3N.js} +40 -42
- package/dist/core/{FilmGrain-DDhrsw94.js → FilmGrain-B-pZBxiK.js} +17 -18
- package/dist/core/{FilmStock-BaP2aTLu.js → FilmStock-BJfso8f3.js} +74 -74
- package/dist/core/{Flip-DYuqyJva.js → Flip-Dbwe0zh8.js} +10 -12
- package/dist/core/{FloatingParticles-DJwNpHtZ.js → FloatingParticles-CoQ01il5.js} +97 -94
- package/dist/core/{FlowField-D4iGiDic.js → FlowField-CU6S3Jar.js} +24 -23
- package/dist/core/{Flower-D0MqoayS.js → Flower-R7HIopNH.js} +14 -13
- package/dist/core/{FlowingGradient-9Zu0Pu4a.js → FlowingGradient-D66Y9Wgq.js} +38 -39
- package/dist/core/{FlutedGlass-C_clmShu.js → FlutedGlass-WAaeW92l.js} +43 -43
- package/dist/core/{Fog-C_kY5pWB.js → Fog-BChoF6fi.js} +172 -171
- package/dist/core/{Form3D-D4aXZGoJ.js → Form3D-DajWNpAi.js} +259 -267
- package/dist/core/{FractalNoise-mMVLGmIv.js → FractalNoise-DIrQ3eQj.js} +30 -28
- package/dist/core/{Frost-M53tZlcf.js → Frost-B_3JSI2H.js} +70 -73
- package/dist/core/{GaborNoise-BhXywN1d.js → GaborNoise-4FWeA9yr.js} +16 -14
- package/dist/core/{Glass-B9D_52op.js → Glass-wOhmSf3v.js} +6 -4
- package/dist/core/{GlassTiles-DIkGYgVE.js → GlassTiles-DgdAiEuy.js} +23 -26
- package/dist/core/{Glitch-CUOJt5VX.js → Glitch-BOiywFUR.js} +60 -65
- package/dist/core/{Glow-D5AdnLvU.js → Glow-C2cEWdNE.js} +76 -77
- package/dist/core/{Godrays-BeQCWVw7.js → Godrays-DAZB2GSn.js} +52 -56
- package/dist/core/{Goo-C0_0QYne.js → Goo-B_WAqWYW.js} +64 -65
- package/dist/core/{GradientMap-DOVK05_a.js → GradientMap-DxsOInED.js} +47 -50
- package/dist/core/{Grayscale-Uv_6LYA9.js → Grayscale-DSHs9mZd.js} +6 -6
- package/dist/core/{Grid-Dbp4DoXZ.js → Grid-aO3wzf4X.js} +46 -48
- package/dist/core/{GridDistortion-D_21zIrm.js → GridDistortion-DsHsHda7.js} +63 -62
- package/dist/core/{Group-DXiB5Qrx.js → Group-CCcDbysC.js} +1 -1
- package/dist/core/{HTMLInCanvas-xXPLTYIv.js → HTMLInCanvas-B2OooKKr.js} +1 -1
- package/dist/core/{Halftone-DszIQsyx.js → Halftone-3a3rz4ln.js} +59 -62
- package/dist/core/{Heart-COpnSJPD.js → Heart-CzO0_GoB.js} +12 -11
- package/dist/core/{Heatmap-CMm8SD-P.js → Heatmap-DPtUc8YG.js} +57 -55
- package/dist/core/{HexGrid-B6wNW-45.js → HexGrid-CN5A0m5j.js} +32 -35
- package/dist/core/{Hologram-XejRN51V.js → Hologram-DoKRhChe.js} +62 -66
- package/dist/core/{Holographic-D1G_Ou1y.js → Holographic-BWyW5z_h.js} +58 -61
- package/dist/core/{HueShift-BCDgYfJs.js → HueShift-C0p8EGk-.js} +7 -10
- package/dist/core/{ImageTexture-BE2Jlkg6.js → ImageTexture-BnwkbXAW.js} +3 -2
- package/dist/core/{InkFlow-DJaJqula.js → InkFlow-BH86usRX.js} +156 -156
- package/dist/core/{Invert-DDmITZjt.js → Invert-BIjy9ddK.js} +4 -4
- package/dist/core/{IrisWipe-BFs5DDSa.js → IrisWipe-lpU7lucQ.js} +20 -23
- package/dist/core/{IsometricCubes-ChKqYTIw.js → IsometricCubes-CIieztxI.js} +37 -42
- package/dist/core/{Kaleidoscope-C8_-tC6T.js → Kaleidoscope-CUMvqmfN.js} +21 -21
- package/dist/core/{KeyFrames-xR9ZzHKj.js → KeyFrames-mI1J02zX.js} +130 -129
- package/dist/core/{LensFlare-DHGNEDIX.js → LensFlare-ChQK_hJN.js} +82 -84
- package/dist/core/{LightEdge-DYfhB3-7.js → LightEdge-Rg-zMpGb.js} +106 -107
- package/dist/core/{LightLeak-CYjuMURe.js → LightLeak-D1CxVo9A.js} +58 -59
- package/dist/core/{LinearBlur-CV7gKYHV.js → LinearBlur-DJBkHfs8.js} +14 -14
- package/dist/core/{LinearGradient-DAzw65UB.js → LinearGradient-DCRYBS4Q.js} +36 -37
- package/dist/core/{LinearWipe-DoDZF7y0.js → LinearWipe-Cxfs1tIO.js} +20 -21
- package/dist/core/{LiquidMetal-C9OxRyE4.js → LiquidMetal-oscNnbsr.js} +70 -73
- package/dist/core/{Liquify-gNsuR7aA.js → Liquify-CJwl6Wef.js} +67 -66
- package/dist/core/{MagneticFilings-CQ7zHEow.js → MagneticFilings-DAOFLjAQ.js} +125 -125
- package/dist/core/{Marble-BSSMSrv8.js → Marble-Cr4Iaq38.js} +22 -21
- package/dist/core/{Mirror-BZAUA2jk.js → Mirror-BwOuv3TP.js} +18 -18
- package/dist/core/{MultiPointGradient-HSfAYB-u.js → MultiPointGradient-CSowH0-7.js} +30 -31
- package/dist/core/{Neon-D9d6Osal.js → Neon-CPIvbGSB.js} +102 -113
- package/dist/core/{NoiseDissolve-CnELvUG_.js → NoiseDissolve-ByahROgQ.js} +23 -22
- package/dist/core/{ObjectTracker-COh35yTh.js → ObjectTracker-DMCr6kHz.js} +3 -3
- package/dist/core/{PagePeel-B6sjmvZ1.js → PagePeel-Coq0hc8R.js} +54 -58
- package/dist/core/{Paper-LfukraJk.js → Paper-CLlhc3fn.js} +16 -15
- package/dist/core/{Parallelogram-DBi0yAG3.js → Parallelogram-Be8RQBV7.js} +14 -13
- package/dist/core/{ParticleField-q7COY9YT.js → ParticleField-DDO-Tk9X.js} +154 -150
- package/dist/core/{ParticleFlow-DiHWbIon.js → ParticleFlow-B89PWVem.js} +210 -208
- package/dist/core/{Particles-BFsKUAPx.js → Particles-D8rP46SB.js} +207 -209
- package/dist/core/{PerlinNoise-KV2GG0ts.js → PerlinNoise-_whB3Y3m.js} +16 -14
- package/dist/core/{Perspective-CJSrtEy5.js → Perspective-BJuQWHOr.js} +23 -25
- package/dist/core/{PixelSort-WD-Y6ZFu.js → PixelSort-CJfXD6g0.js} +109 -109
- package/dist/core/{PixelThrow-CnOXm7Hv.js → PixelThrow-BaTI5PzH.js} +35 -35
- package/dist/core/{Pixelate-XJI9f1oT.js → Pixelate-D7Dto_8I.js} +19 -19
- package/dist/core/{Plasma-C0dnSaw1.js → Plasma-DWIDcCnn.js} +33 -32
- package/dist/core/{Plastic-DBv_6A7q.js → Plastic-CWAOd2i9.js} +82 -84
- package/dist/core/{PolarCoordinates-B8Cq2bzT.js → PolarCoordinates-DQM3dLK3.js} +16 -18
- package/dist/core/{Polygon-ORM35JKg.js → Polygon-CFmLohBu.js} +16 -17
- package/dist/core/{Posterize-Dn-Vv2S1.js → Posterize-B8PHXwhy.js} +5 -8
- package/dist/core/{Prism-CYLsGJHY.js → Prism-C5VS4TLU.js} +36 -40
- package/dist/core/{ProgressiveBlur-BXUumCm5.js → ProgressiveBlur-BcGcteLH.js} +63 -65
- package/dist/core/{RadialGradient-j6T56q1W.js → RadialGradient-D3UoKiGu.js} +22 -23
- package/dist/core/{RadialWipe-Bz19qvls.js → RadialWipe-DXfAH0Ug.js} +25 -25
- package/dist/core/{RandomBars-3RlhwDYG.js → RandomBars-BVsp1Q7v.js} +23 -23
- package/dist/core/{ReactionDiffusion-DdXavIVw.js → ReactionDiffusion-DknxOF-o.js} +173 -175
- package/dist/core/{RectangularCoordinates-p3250IKV.js → RectangularCoordinates-DFQm4y6H.js} +14 -14
- package/dist/core/{ReflectivePlane-BOl9AEoO.js → ReflectivePlane-BDlGBzo1.js} +35 -37
- package/dist/core/{Repeater-BMXmN95R.js → Repeater-DHW6eDAm.js} +2 -2
- package/dist/core/{Ring-DKcROHDs.js → Ring-3brC5en8.js} +15 -14
- package/dist/core/{RippleWipe-QH8D0Y-2.js → RippleWipe-DQfXGjRv.js} +24 -27
- package/dist/core/{Ripples-8fFdo6aq.js → Ripples-DajR3Cl5.js} +18 -21
- package/dist/core/{RoundedRect-Cr76tP9o.js → RoundedRect-CfkYNmkV.js} +14 -13
- package/dist/core/{Saturation-Dqifs1x7.js → Saturation-BPTssGSs.js} +8 -9
- package/dist/core/{Scratches-sa8JU4Eb.js → Scratches-A-AyASZm.js} +16 -14
- package/dist/core/{Sharpness-IRuPd9nn.js → Sharpness-Di39DpCB.js} +21 -22
- package/dist/core/{Shatter-BYaxMvyd.js → Shatter-CWf3HtjN.js} +73 -72
- package/dist/core/{SimplexNoise-C2vmRzgy.js → SimplexNoise-DpZ2jtdk.js} +19 -17
- package/dist/core/{SineWave-BGAJyGFr.js → SineWave-CZuksvHn.js} +20 -20
- package/dist/core/{SliceWipe-BOcCk5Se.js → SliceWipe-BwL2D3HR.js} +19 -19
- package/dist/core/{Smoke-B1twbhQ4.js → Smoke-BsUkbTI1.js} +156 -155
- package/dist/core/{SmokeFill-CAayneM2.js → SmokeFill-CaDMgNW-.js} +233 -231
- package/dist/core/{SmokeFlow-Ug8difAz.js → SmokeFlow-CLfsAbPS.js} +143 -142
- package/dist/core/{Solarize-205KKROH.js → Solarize-ALjXXAf0.js} +12 -14
- package/dist/core/{SolidColor-B4pj8onb.js → SolidColor-Cu_9b_my.js} +1 -1
- package/dist/core/{Spherize-DUQxwwCL.js → Spherize-SBfCc9Wk.js} +31 -37
- package/dist/core/{Spiral-DY1c-N4F.js → Spiral-iRrT222n.js} +36 -36
- package/dist/core/{Star-DRxNaHHo.js → Star-DL3d_HqY.js} +14 -13
- package/dist/core/{Stone-CUdcvOWd.js → Stone-OTsCM-rr.js} +2 -2
- package/dist/core/{Strands-CFxYJMFu.js → Strands-DjoQgGnd.js} +47 -49
- package/dist/core/{Stretch-DYrVdt8A.js → Stretch-CdzhxnbM.js} +19 -19
- package/dist/core/{Stripes-BvnoWdwn.js → Stripes-CsBgKYdp.js} +39 -39
- package/dist/core/{StudioBackground-srQGUpfZ.js → StudioBackground-D8EdrLg5.js} +67 -68
- package/dist/core/{SunBurst-COsVDZ4e.js → SunBurst-ErBFL-nF.js} +18 -20
- package/dist/core/{Surface3D-TsGPzdGm.js → Surface3D-CLjX61TZ.js} +144 -144
- package/dist/core/{Swirl-nXMWVY2X.js → Swirl-DDQif_lC.js} +18 -21
- package/dist/core/{Teardrop-Bjtkigk4.js → Teardrop-CvpdElTs.js} +13 -12
- package/dist/core/{Text-BGdsqRl5.js → Text-vyzeMvhl.js} +20 -21
- package/dist/core/{ThinFilm-DhMKI5e2.js → ThinFilm-CbkMTbD2.js} +59 -67
- package/dist/core/{TiltShift-BwuYyXB6.js → TiltShift-BVMyB8lF.js} +66 -67
- package/dist/core/{TimeTrail-CE2XumxR.js → TimeTrail-CuFGvzFi.js} +91 -94
- package/dist/core/{Tint-BTmcGjEl.js → Tint-C6zMMsYH.js} +25 -26
- package/dist/core/{Trapezoid-CiZCh8QS.js → Trapezoid-kFuxWONU.js} +14 -13
- package/dist/core/{TriangularGrid-BnQOEljy.js → TriangularGrid-FIrpI_qE.js} +34 -36
- package/dist/core/{Tritone-Ta084wlF.js → Tritone-DyLGtOug.js} +7 -10
- package/dist/core/{Truchet-BxCh_IIp.js → Truchet-B4NI56Zz.js} +31 -33
- package/dist/core/{Twirl-Cw4jm59Q.js → Twirl-CuzhWXfj.js} +16 -16
- package/dist/core/{VHS-Nwk0E-tf.js → VHS-DYbzndAZ.js} +68 -69
- package/dist/core/{VenetianBlinds-BZ0sS97G.js → VenetianBlinds-DVopy3xp.js} +22 -23
- package/dist/core/{Vesica-Cf1KiSzK.js → Vesica-Cd-XyG3F.js} +13 -12
- package/dist/core/{Vibrance-qWGvLkrW.js → Vibrance-CvXatkfO.js} +7 -8
- package/dist/core/{VideoTexture-48ylVDvN.js → VideoTexture-C5PS6Vly.js} +34 -39
- package/dist/core/{Vignette-CK_Li7v2.js → Vignette-DtBpWWxW.js} +20 -22
- package/dist/core/{Voronoi-DMYFDwIS.js → Voronoi-CRH2cGlR.js} +33 -37
- package/dist/core/{Water-D74wbHmn.js → Water-CneenzRZ.js} +101 -108
- package/dist/core/{Watercolor-zo8-4Vqx.js → Watercolor-B343pgM-.js} +63 -64
- package/dist/core/{WaveDistortion-BLrvGOzF.js → WaveDistortion-DHz1FxLT.js} +80 -82
- package/dist/core/{WaveletNoise-a5OpO8-D.js → WaveletNoise-CsLE9gbM.js} +16 -14
- package/dist/core/{Weave-D1D3kuUg.js → Weave-CQEF71nr.js} +28 -31
- package/dist/core/{WebcamTexture-pBETyQYG.js → WebcamTexture-BcsYFM_g.js} +7 -7
- package/dist/core/{Wool-CMnWPdy9.js → Wool-BFSicimy.js} +2 -2
- package/dist/core/{WorleyNoise-BAEo0duh.js → WorleyNoise-BKq3es5v.js} +69 -70
- package/dist/core/{ZoomBlur-CnBNmcfx.js → ZoomBlur-Bu1SlmS2.js} +12 -12
- package/dist/core/agents-Bv3--qPL.js +997 -0
- package/dist/core/blur-tvWOoxKt.js +2247 -0
- package/dist/core/compute-BjeJ0sIA.js +31 -0
- package/dist/core/dataEncoding-CEmpiitu.js +24 -0
- package/dist/core/device-BODv_4aH.js +10 -0
- package/dist/core/edges-BXNBKxSN.js +29857 -0
- package/dist/core/{glass-sOqjtPJD.js → glass-IfoQ8Prf.js} +164 -172
- package/dist/core/gpu/index.d.ts.map +1 -1
- package/dist/core/index.js +320 -229
- package/dist/core/media-B9BNeMPu.js +757 -0
- package/dist/core/noise-wTSHXgFz.js +12033 -0
- package/dist/core/noiseColor-CPakiKNF.js +103 -0
- package/dist/core/{noiseColor-CRpf22bk.js → noiseColor-DscZM9CO.js} +2 -2
- package/dist/core/noiseStylize-BXpflWPW.js +359 -0
- package/dist/core/porters-DBK1Aipq.js +991 -0
- package/dist/core/presetRenderer.d.ts.map +1 -1
- package/dist/core/registry.js +208 -199
- package/dist/core/sdf-R0EN3EvS.js +5174 -0
- package/dist/core/shaderRegistry-CcvE7wN0.js +425 -0
- package/dist/core/shaders/AngularBlur/index.js +5 -4
- package/dist/core/shaders/Arc/index.js +7 -4
- package/dist/core/shaders/Ascii/index.js +5 -4
- package/dist/core/shaders/Aurora/index.js +6 -4
- package/dist/core/shaders/BarShift/index.js +5 -4
- package/dist/core/shaders/BarnDoors/index.js +5 -4
- package/dist/core/shaders/Beam/index.js +5 -4
- package/dist/core/shaders/Bend/index.js +5 -4
- package/dist/core/shaders/Blob/index.js +5 -4
- package/dist/core/shaders/BlockDissolve/index.js +6 -4
- package/dist/core/shaders/BlockNoise/index.js +8 -5
- package/dist/core/shaders/BlueNoise/index.js +8 -5
- package/dist/core/shaders/Blur/index.js +6 -4
- package/dist/core/shaders/Boids/index.js +7 -4
- package/dist/core/shaders/BokehBlur/index.js +6 -4
- package/dist/core/shaders/BrickPattern/index.js +5 -4
- package/dist/core/shaders/BrightnessContrast/index.js +5 -4
- package/dist/core/shaders/BrushedMetal/index.js +11 -6
- package/dist/core/shaders/Bulge/index.js +5 -4
- package/dist/core/shaders/CRTScreen/index.js +5 -4
- package/dist/core/shaders/CarbonFiber/index.js +11 -6
- package/dist/core/shaders/Chalkboard/index.js +5 -4
- package/dist/core/shaders/ChannelBlur/index.js +6 -4
- package/dist/core/shaders/CheckerWipe/index.js +5 -4
- package/dist/core/shaders/Checkerboard/index.js +5 -4
- package/dist/core/shaders/Chevron/index.js +5 -4
- package/dist/core/shaders/ChromaFlow/index.js +6 -4
- package/dist/core/shaders/ChromaticAberration/index.js +5 -4
- package/dist/core/shaders/Circle/index.js +7 -4
- package/dist/core/shaders/ColorWheel/index.js +5 -4
- package/dist/core/shaders/CompressionArtifacts/index.js +5 -4
- package/dist/core/shaders/ConcentricSpin/index.js +5 -4
- package/dist/core/shaders/ConicGradient/index.js +5 -4
- package/dist/core/shaders/ContourLines/index.js +5 -4
- package/dist/core/shaders/CornerPin/index.js +5 -4
- package/dist/core/shaders/Crescent/index.js +7 -4
- package/dist/core/shaders/Cross/index.js +7 -4
- package/dist/core/shaders/Crystal/index.js +11 -6
- package/dist/core/shaders/CurlNoise/index.js +8 -5
- package/dist/core/shaders/CursorRipples/index.js +5 -4
- package/dist/core/shaders/CursorTrail/index.js +5 -4
- package/dist/core/shaders/DataMosh/index.js +5 -4
- package/dist/core/shaders/DiamondGradient/index.js +5 -4
- package/dist/core/shaders/DiamondWipe/index.js +5 -4
- package/dist/core/shaders/DiffuseBlur/index.js +5 -4
- package/dist/core/shaders/DisplacementMap/index.js +5 -4
- package/dist/core/shaders/Dither/index.js +5 -4
- package/dist/core/shaders/DotGrid/index.js +5 -4
- package/dist/core/shaders/DropShadow/index.js +5 -4
- package/dist/core/shaders/Duotone/index.js +5 -4
- package/dist/core/shaders/Ellipse/index.js +7 -4
- package/dist/core/shaders/Emboss/index.js +10 -6
- package/dist/core/shaders/Engraving/index.js +6 -4
- package/dist/core/shaders/ErosionNoise/index.js +8 -5
- package/dist/core/shaders/Exposure/index.js +5 -4
- package/dist/core/shaders/FallingLines/index.js +5 -4
- package/dist/core/shaders/FilmGrain/index.js +5 -4
- package/dist/core/shaders/FilmStock/index.js +6 -4
- package/dist/core/shaders/Flip/index.js +5 -4
- package/dist/core/shaders/FloatingParticles/index.js +7 -4
- package/dist/core/shaders/FlowField/index.js +6 -4
- package/dist/core/shaders/Flower/index.js +7 -4
- package/dist/core/shaders/FlowingGradient/index.js +6 -4
- package/dist/core/shaders/FlutedGlass/index.js +5 -4
- package/dist/core/shaders/Fog/index.js +5 -4
- package/dist/core/shaders/Form3D/index.js +5 -4
- package/dist/core/shaders/FractalNoise/index.js +7 -4
- package/dist/core/shaders/Frost/index.js +11 -6
- package/dist/core/shaders/GaborNoise/index.js +8 -5
- package/dist/core/shaders/Glass/index.js +11 -6
- package/dist/core/shaders/GlassTiles/index.js +5 -4
- package/dist/core/shaders/Glitch/index.js +5 -4
- package/dist/core/shaders/Glow/index.js +6 -4
- package/dist/core/shaders/Godrays/index.js +5 -4
- package/dist/core/shaders/Goo/index.js +10 -6
- package/dist/core/shaders/GradientMap/index.js +5 -4
- package/dist/core/shaders/Grayscale/index.js +5 -4
- package/dist/core/shaders/Grid/index.js +5 -4
- package/dist/core/shaders/GridDistortion/index.js +5 -4
- package/dist/core/shaders/Group/index.js +5 -4
- package/dist/core/shaders/HTMLInCanvas/index.js +5 -4
- package/dist/core/shaders/Halftone/index.js +5 -4
- package/dist/core/shaders/Heart/index.js +7 -4
- package/dist/core/shaders/Heatmap/index.js +11 -6
- package/dist/core/shaders/HexGrid/index.js +5 -4
- package/dist/core/shaders/Hologram/index.js +11 -6
- package/dist/core/shaders/Holographic/index.js +11 -6
- package/dist/core/shaders/HueShift/index.js +5 -4
- package/dist/core/shaders/ImageTexture/index.js +7 -5
- package/dist/core/shaders/InkFlow/index.js +5 -4
- package/dist/core/shaders/Invert/index.js +5 -4
- package/dist/core/shaders/IrisWipe/index.js +5 -4
- package/dist/core/shaders/IsometricCubes/index.js +5 -4
- package/dist/core/shaders/Kaleidoscope/index.js +5 -4
- package/dist/core/shaders/KeyFrames/index.js +5 -4
- package/dist/core/shaders/LensFlare/index.js +5 -4
- package/dist/core/shaders/LightEdge/index.js +11 -6
- package/dist/core/shaders/LightLeak/index.js +6 -4
- package/dist/core/shaders/LinearBlur/index.js +5 -4
- package/dist/core/shaders/LinearGradient/index.js +5 -4
- package/dist/core/shaders/LinearWipe/index.js +5 -4
- package/dist/core/shaders/LiquidMetal/index.js +11 -6
- package/dist/core/shaders/Liquify/index.js +5 -4
- package/dist/core/shaders/MagneticFilings/index.js +7 -4
- package/dist/core/shaders/Marble/index.js +6 -4
- package/dist/core/shaders/Mirror/index.js +5 -4
- package/dist/core/shaders/MultiPointGradient/index.js +5 -4
- package/dist/core/shaders/Neon/index.js +9 -5
- package/dist/core/shaders/NoiseDissolve/index.js +6 -4
- package/dist/core/shaders/ObjectTracker/index.js +6 -5
- package/dist/core/shaders/PagePeel/index.js +5 -4
- package/dist/core/shaders/Paper/index.js +6 -4
- package/dist/core/shaders/Parallelogram/index.js +7 -4
- package/dist/core/shaders/ParticleField/index.js +8 -4
- package/dist/core/shaders/ParticleFlow/index.js +7 -4
- package/dist/core/shaders/Particles/index.js +11 -5
- package/dist/core/shaders/PerlinNoise/index.js +8 -5
- package/dist/core/shaders/Perspective/index.js +5 -4
- package/dist/core/shaders/PixelSort/index.js +5 -4
- package/dist/core/shaders/PixelThrow/index.js +6 -4
- package/dist/core/shaders/Pixelate/index.js +5 -4
- package/dist/core/shaders/Plasma/index.js +6 -4
- package/dist/core/shaders/Plastic/index.js +11 -6
- package/dist/core/shaders/PolarCoordinates/index.js +5 -4
- package/dist/core/shaders/Polygon/index.js +7 -4
- package/dist/core/shaders/Posterize/index.js +5 -4
- package/dist/core/shaders/Prism/index.js +5 -4
- package/dist/core/shaders/ProgressiveBlur/index.js +6 -4
- package/dist/core/shaders/RadialGradient/index.js +5 -4
- package/dist/core/shaders/RadialWipe/index.js +5 -4
- package/dist/core/shaders/RandomBars/index.js +6 -4
- package/dist/core/shaders/ReactionDiffusion/index.js +5 -4
- package/dist/core/shaders/RectangularCoordinates/index.js +5 -4
- package/dist/core/shaders/ReflectivePlane/index.js +6 -4
- package/dist/core/shaders/Repeater/index.js +5 -4
- package/dist/core/shaders/Ring/index.js +7 -4
- package/dist/core/shaders/RippleWipe/index.js +5 -4
- package/dist/core/shaders/Ripples/index.js +5 -4
- package/dist/core/shaders/RoundedRect/index.js +7 -4
- package/dist/core/shaders/Saturation/index.js +5 -4
- package/dist/core/shaders/Scratches/index.js +8 -5
- package/dist/core/shaders/Sharpness/index.js +5 -4
- package/dist/core/shaders/Shatter/index.js +6 -4
- package/dist/core/shaders/SimplexNoise/index.js +7 -4
- package/dist/core/shaders/SineWave/index.js +5 -4
- package/dist/core/shaders/SliceWipe/index.js +5 -4
- package/dist/core/shaders/Smoke/index.js +5 -4
- package/dist/core/shaders/SmokeFill/index.js +10 -6
- package/dist/core/shaders/SmokeFlow/index.js +5 -4
- package/dist/core/shaders/Solarize/index.js +5 -4
- package/dist/core/shaders/SolidColor/index.js +2 -2
- package/dist/core/shaders/Spherize/index.js +5 -4
- package/dist/core/shaders/Spiral/index.js +5 -4
- package/dist/core/shaders/Star/index.js +7 -4
- package/dist/core/shaders/Stone/index.js +4 -3
- package/dist/core/shaders/Strands/index.js +5 -4
- package/dist/core/shaders/Stretch/index.js +5 -4
- package/dist/core/shaders/Stripes/index.js +5 -4
- package/dist/core/shaders/StudioBackground/index.js +5 -4
- package/dist/core/shaders/SunBurst/index.js +5 -4
- package/dist/core/shaders/Surface3D/index.js +6 -4
- package/dist/core/shaders/Swirl/index.js +5 -4
- package/dist/core/shaders/Teardrop/index.js +7 -4
- package/dist/core/shaders/Text/index.js +6 -5
- package/dist/core/shaders/ThinFilm/index.js +9 -5
- package/dist/core/shaders/TiltShift/index.js +6 -4
- package/dist/core/shaders/TimeTrail/index.js +5 -4
- package/dist/core/shaders/Tint/index.js +5 -4
- package/dist/core/shaders/Trapezoid/index.js +7 -4
- package/dist/core/shaders/TriangularGrid/index.js +5 -4
- package/dist/core/shaders/Tritone/index.js +5 -4
- package/dist/core/shaders/Truchet/index.js +5 -4
- package/dist/core/shaders/Twirl/index.js +5 -4
- package/dist/core/shaders/VHS/index.js +5 -4
- package/dist/core/shaders/VenetianBlinds/index.js +5 -4
- package/dist/core/shaders/Vesica/index.js +7 -4
- package/dist/core/shaders/Vibrance/index.js +5 -4
- package/dist/core/shaders/VideoTexture/index.js +6 -5
- package/dist/core/shaders/Vignette/index.js +5 -4
- package/dist/core/shaders/Voronoi/index.js +5 -4
- package/dist/core/shaders/Water/index.js +11 -6
- package/dist/core/shaders/Watercolor/index.js +5 -4
- package/dist/core/shaders/WaveDistortion/index.js +5 -4
- package/dist/core/shaders/WaveletNoise/index.js +8 -5
- package/dist/core/shaders/Weave/index.js +5 -4
- package/dist/core/shaders/WebcamTexture/index.js +7 -5
- package/dist/core/shaders/Wool/index.js +4 -3
- package/dist/core/shaders/WorleyNoise/index.js +5 -4
- package/dist/core/shaders/ZoomBlur/index.js +5 -4
- package/dist/core/shapeEffectBounds-CtKwBX8c.js +19213 -0
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +188 -184
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +197 -193
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
- package/dist/core/coords-BkIjixe_.js +0 -55724
- package/dist/core/noiseStylize-J6sFKoTh.js +0 -65
- package/dist/core/porters-BmU6G9TR.js +0 -321
- package/dist/core/shaderRegistry-D75z2sND.js +0 -425
- package/dist/core/shapeEffectBounds-PQqKLQXO.js +0 -406
- /package/dist/core/{fonts-DwhbVe2B.js → fonts-v_F1SFl9.js} +0 -0
- /package/dist/core/{naturalSize-Caz3-kRv.js → naturalSize-B679wTgN.js} +0 -0
- /package/dist/core/{transformations-t0d2-uSX.js → transformations-CsPUHppB.js} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $t as vec2f, Ct as floor, Et as max, Gt as textureStorage2d, H as mixColorsLinear, Ht as atomic, It as sin, Rt as sqrt, Tt as length, U as mixColorsVariants, Ut as arrayOf, Vt as data_exports, Xt as struct, _t as clamp, an as f32, at as textureStore, bt as dot, d as ZERO, dt as atomicStore, et as src_default, in as vec4f, lt as atomicAdd, nn as vec3f, nt as std_exports, on as i32, pt as select, sn as u32, tn as vec2u, ut as atomicLoad, vt as cos, xt as exp } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { l as hash33, o as hash11, p as noise_exports } from "./noise-wTSHXgFz.js";
|
|
3
|
+
import { n as createGuardedCompute, r as createStateBuffer } from "./compute-BjeJ0sIA.js";
|
|
4
|
+
import { a as makeAgentWeightFn, c as resolveAgentShape, o as orientedShapeOptions, t as AGENT_SHAPES } from "./agents-Bv3--qPL.js";
|
|
5
|
+
import { a as transformColor, o as transformColorSpace, t as colorSpaceOptions } from "./transformations-CsPUHppB.js";
|
|
3
6
|
var MAX_AGENTS = 4096;
|
|
4
7
|
var RES = 1024;
|
|
5
8
|
var INV_RES = 1 / RES;
|
|
@@ -15,67 +18,67 @@ var AGIT_GAIN = .4545;
|
|
|
15
18
|
var AGIT_COOL = 1.3;
|
|
16
19
|
var HARD_GAIN = 637;
|
|
17
20
|
var SOFT_GAIN = 255;
|
|
18
|
-
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
19
|
-
colA:
|
|
20
|
-
colB:
|
|
21
|
-
count:
|
|
22
|
-
trails:
|
|
23
|
-
dt:
|
|
24
|
-
aspect:
|
|
25
|
-
domainX:
|
|
26
|
-
maxSpeed:
|
|
27
|
-
maxForce:
|
|
28
|
-
perceptionSq:
|
|
29
|
-
sepRadiusSq:
|
|
30
|
-
sepW:
|
|
31
|
-
aliW:
|
|
32
|
-
cohW:
|
|
33
|
-
cursorX:
|
|
34
|
-
cursorY:
|
|
35
|
-
cursorMode:
|
|
36
|
-
cursorRadius:
|
|
37
|
-
cursorRadiusSq:
|
|
38
|
-
cursorForce:
|
|
39
|
-
bodyR:
|
|
40
|
-
margin:
|
|
41
|
-
turnForce:
|
|
42
|
-
seed:
|
|
21
|
+
var SimParams = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
22
|
+
colA: vec4f,
|
|
23
|
+
colB: vec4f,
|
|
24
|
+
count: f32,
|
|
25
|
+
trails: f32,
|
|
26
|
+
dt: f32,
|
|
27
|
+
aspect: f32,
|
|
28
|
+
domainX: f32,
|
|
29
|
+
maxSpeed: f32,
|
|
30
|
+
maxForce: f32,
|
|
31
|
+
perceptionSq: f32,
|
|
32
|
+
sepRadiusSq: f32,
|
|
33
|
+
sepW: f32,
|
|
34
|
+
aliW: f32,
|
|
35
|
+
cohW: f32,
|
|
36
|
+
cursorX: f32,
|
|
37
|
+
cursorY: f32,
|
|
38
|
+
cursorMode: f32,
|
|
39
|
+
cursorRadius: f32,
|
|
40
|
+
cursorRadiusSq: f32,
|
|
41
|
+
cursorForce: f32,
|
|
42
|
+
bodyR: f32,
|
|
43
|
+
margin: f32,
|
|
44
|
+
turnForce: f32,
|
|
45
|
+
seed: f32
|
|
43
46
|
}), "SimParams");
|
|
44
|
-
var simLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
47
|
+
var simLayout = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(src_default.bindGroupLayout({
|
|
45
48
|
agents: {
|
|
46
|
-
storage:
|
|
49
|
+
storage: arrayOf(vec4f, MAX_AGENTS),
|
|
47
50
|
access: "mutable"
|
|
48
51
|
},
|
|
49
52
|
agit: {
|
|
50
|
-
storage:
|
|
53
|
+
storage: arrayOf(f32, MAX_AGENTS),
|
|
51
54
|
access: "mutable"
|
|
52
55
|
},
|
|
53
56
|
accumE: {
|
|
54
|
-
storage:
|
|
57
|
+
storage: arrayOf(atomic(u32), RES * RES),
|
|
55
58
|
access: "mutable"
|
|
56
59
|
},
|
|
57
60
|
accumS: {
|
|
58
|
-
storage:
|
|
61
|
+
storage: arrayOf(atomic(u32), RES * RES),
|
|
59
62
|
access: "mutable"
|
|
60
63
|
},
|
|
61
64
|
trailBuf: {
|
|
62
|
-
storage:
|
|
65
|
+
storage: arrayOf(vec4f, RES * RES),
|
|
63
66
|
access: "mutable"
|
|
64
67
|
},
|
|
65
68
|
params: { uniform: SimParams },
|
|
66
|
-
outTex: { storageTexture:
|
|
69
|
+
outTex: { storageTexture: textureStorage2d(STATE_FORMAT, "write-only") }
|
|
67
70
|
}), "simLayout");
|
|
68
|
-
var safeSteer =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
],
|
|
71
|
+
var safeSteer = src_default.fn([
|
|
72
|
+
vec2f,
|
|
73
|
+
vec2f,
|
|
74
|
+
f32,
|
|
75
|
+
f32
|
|
76
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((dir, vel, maxSpeed, maxForce) => {
|
|
74
77
|
"use gpu";
|
|
75
|
-
const len =
|
|
76
|
-
const steer =
|
|
77
|
-
const sl =
|
|
78
|
-
return
|
|
78
|
+
const len = length(dir);
|
|
79
|
+
const steer = select(vec2f(0, 0), dir.div(max(len, 1e-5)).mul(maxSpeed), len > 1e-5).sub(vel);
|
|
80
|
+
const sl = length(steer);
|
|
81
|
+
return select(steer, steer.div(max(sl, 1e-5)).mul(maxForce), sl > maxForce);
|
|
79
82
|
}), {
|
|
80
83
|
v: 1,
|
|
81
84
|
name: void 0,
|
|
@@ -238,30 +241,30 @@ var safeSteer = tgpu.fn([
|
|
|
238
241
|
"externalNames": ["std", "d"]
|
|
239
242
|
},
|
|
240
243
|
externals: () => ({
|
|
241
|
-
std,
|
|
242
|
-
d
|
|
244
|
+
std: std_exports,
|
|
245
|
+
d: data_exports
|
|
243
246
|
})
|
|
244
247
|
}) && $.f)({}));
|
|
245
|
-
const boidsInitKernel =
|
|
248
|
+
const boidsInitKernel = src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
246
249
|
"use gpu";
|
|
247
250
|
const prm = simLayout.$.params;
|
|
248
|
-
const fi =
|
|
251
|
+
const fi = f32(i);
|
|
249
252
|
const sd = __tsover_mul(prm.seed, 13.137);
|
|
250
|
-
const flocks =
|
|
251
|
-
const c = __tsover_sub(fi, __tsover_mul(
|
|
252
|
-
const rc = hash33(
|
|
253
|
+
const flocks = max(floor(__tsover_div(prm.count, 250)), f32(3));
|
|
254
|
+
const c = __tsover_sub(fi, __tsover_mul(floor(__tsover_div(fi, flocks)), flocks));
|
|
255
|
+
const rc = hash33(vec3f(__tsover_add(__tsover_add(__tsover_mul(c, 7.1315), sd), .71), __tsover_add(__tsover_add(__tsover_mul(c, 3.7719), sd), 4.17), __tsover_add(__tsover_add(__tsover_mul(c, 9.4103), sd), 9.03)));
|
|
253
256
|
const ang = __tsover_mul(rc.z, TAU);
|
|
254
|
-
const hd =
|
|
255
|
-
const center =
|
|
256
|
-
const ra = hash33(
|
|
257
|
+
const hd = vec2f(cos(ang), sin(ang));
|
|
258
|
+
const center = vec2f(__tsover_mul(__tsover_add(.12, __tsover_mul(rc.x, .76)), prm.domainX), __tsover_add(.12, __tsover_mul(rc.y, .76)));
|
|
259
|
+
const ra = hash33(vec3f(__tsover_add(__tsover_add(__tsover_mul(fi, 1.6180339), sd), .71), __tsover_add(__tsover_add(__tsover_mul(fi, 2.7182818), sd), 4.17), __tsover_add(__tsover_add(__tsover_mul(fi, 3.1415926), sd), 9.03)));
|
|
257
260
|
const t = __tsover_mul(__tsover_sub(ra.x, .5), .6);
|
|
258
261
|
const n = __tsover_mul(__tsover_sub(ra.y, .5), .16);
|
|
259
|
-
const px =
|
|
260
|
-
const py =
|
|
262
|
+
const px = clamp(__tsover_sub(__tsover_add(center.x, __tsover_mul(hd.x, t)), __tsover_mul(hd.y, n)), 0, prm.domainX);
|
|
263
|
+
const py = clamp(__tsover_add(__tsover_add(center.y, __tsover_mul(hd.y, t)), __tsover_mul(hd.x, n)), 0, 1);
|
|
261
264
|
const jAng = __tsover_add(ang, __tsover_mul(__tsover_sub(ra.z, .5), .5));
|
|
262
265
|
const sp = __tsover_mul(prm.maxSpeed, __tsover_add(.75, __tsover_mul(ra.y, .25)));
|
|
263
|
-
simLayout.$.agents[i] =
|
|
264
|
-
simLayout.$.agit[i] =
|
|
266
|
+
simLayout.$.agents[i] = vec4f(px, py, __tsover_mul(cos(jAng), sp), __tsover_mul(sin(jAng), sp));
|
|
267
|
+
simLayout.$.agit[i] = f32(0);
|
|
265
268
|
}), {
|
|
266
269
|
v: 1,
|
|
267
270
|
name: void 0,
|
|
@@ -896,17 +899,17 @@ const boidsInitKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalThis.__T
|
|
|
896
899
|
},
|
|
897
900
|
externals: () => ({
|
|
898
901
|
simLayout,
|
|
899
|
-
d,
|
|
900
|
-
std,
|
|
902
|
+
d: data_exports,
|
|
903
|
+
std: std_exports,
|
|
901
904
|
noise: noise_exports,
|
|
902
905
|
TAU
|
|
903
906
|
})
|
|
904
907
|
}) && $.f)({})).$name("boidsInit");
|
|
905
|
-
const boidsClearAccumKernel =
|
|
908
|
+
const boidsClearAccumKernel = src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
906
909
|
"use gpu";
|
|
907
|
-
const idx = __tsover_add(__tsover_mul(y,
|
|
908
|
-
|
|
909
|
-
|
|
910
|
+
const idx = __tsover_add(__tsover_mul(y, u32(RES)), x);
|
|
911
|
+
atomicStore(simLayout.$.accumE[idx], u32(0));
|
|
912
|
+
atomicStore(simLayout.$.accumS[idx], u32(0));
|
|
910
913
|
}), {
|
|
911
914
|
v: 1,
|
|
912
915
|
name: void 0,
|
|
@@ -1009,9 +1012,9 @@ const boidsClearAccumKernel = tgpu.fn([d.u32, d.u32])(/* @__PURE__ */ (($) => (g
|
|
|
1009
1012
|
]
|
|
1010
1013
|
},
|
|
1011
1014
|
externals: () => ({
|
|
1012
|
-
d,
|
|
1015
|
+
d: data_exports,
|
|
1013
1016
|
RES,
|
|
1014
|
-
std,
|
|
1017
|
+
std: std_exports,
|
|
1015
1018
|
simLayout
|
|
1016
1019
|
})
|
|
1017
1020
|
}) && $.f)({})).$name("boidsClearAccum");
|
|
@@ -1023,41 +1026,40 @@ function makeBoidsSplatKernel(shape) {
|
|
|
1023
1026
|
const SOFT = s.soft;
|
|
1024
1027
|
const EXT = name === "glow" ? s.ext + 1 : s.ext;
|
|
1025
1028
|
const GAIN = s.soft ? SOFT_GAIN : HARD_GAIN;
|
|
1026
|
-
return
|
|
1029
|
+
return src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
1027
1030
|
"use gpu";
|
|
1028
1031
|
const prm = simLayout.$.params;
|
|
1029
1032
|
const a = simLayout.$.agents[i];
|
|
1030
|
-
const pos =
|
|
1031
|
-
const vel =
|
|
1032
|
-
const spd =
|
|
1033
|
-
const dir =
|
|
1034
|
-
const agitI =
|
|
1035
|
-
const bodyR =
|
|
1033
|
+
const pos = vec2f(a.x, a.y);
|
|
1034
|
+
const vel = vec2f(a.z, a.w);
|
|
1035
|
+
const spd = length(vel);
|
|
1036
|
+
const dir = select(vec2f(1, 0), vel.div(max(spd, 1e-5)), spd > 1e-5);
|
|
1037
|
+
const agitI = clamp(simLayout.$.agit[i], 0, 1);
|
|
1038
|
+
const bodyR = max(prm.bodyR, 1e-6);
|
|
1036
1039
|
const hl = __tsover_mul(bodyR, HL);
|
|
1037
1040
|
const extSq = __tsover_mul(__tsover_add(__tsover_mul(bodyR, EXT), __tsover_mul(AA_W, 2)), __tsover_add(__tsover_mul(bodyR, EXT), __tsover_mul(AA_W, 2)));
|
|
1038
|
-
const txf = __tsover_mul(__tsover_div(pos.x, prm.aspect),
|
|
1039
|
-
const tyf = __tsover_mul(pos.y,
|
|
1040
|
-
const cxi =
|
|
1041
|
-
const cyi =
|
|
1041
|
+
const txf = __tsover_mul(__tsover_div(pos.x, prm.aspect), f32(RES));
|
|
1042
|
+
const tyf = __tsover_mul(pos.y, f32(RES));
|
|
1043
|
+
const cxi = i32(floor(txf));
|
|
1044
|
+
const cyi = i32(floor(tyf));
|
|
1042
1045
|
for (let ky = 0; ky < SPLAT_WIN; ky++) for (let kx = 0; kx < SPLAT_WIN; kx++) {
|
|
1043
1046
|
const px = __tsover_sub(__tsover_add(cxi, kx), SPLAT_R);
|
|
1044
1047
|
const py = __tsover_sub(__tsover_add(cyi, ky), SPLAT_R);
|
|
1045
1048
|
if (px >= 0 && px < RES && py >= 0 && py < RES) {
|
|
1046
|
-
const offX = __tsover_sub(__tsover_mul(__tsover_mul(__tsover_add(
|
|
1047
|
-
const offY = __tsover_sub(__tsover_mul(__tsover_add(
|
|
1049
|
+
const offX = __tsover_sub(__tsover_mul(__tsover_mul(__tsover_add(f32(px), .5), INV_RES), prm.aspect), pos.x);
|
|
1050
|
+
const offY = __tsover_sub(__tsover_mul(__tsover_add(f32(py), .5), INV_RES), pos.y);
|
|
1048
1051
|
if (__tsover_add(__tsover_mul(offX, offX), __tsover_mul(offY, offY)) < extSq) {
|
|
1049
1052
|
const t = __tsover_add(__tsover_mul(offX, dir.x), __tsover_mul(offY, dir.y));
|
|
1050
1053
|
const n = __tsover_add(__tsover_mul(offX, -dir.y), __tsover_mul(offY, dir.x));
|
|
1051
|
-
const
|
|
1052
|
-
const
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
std.atomicAdd(simLayout.$.accumS[idx], d.u32(__tsover_mul(__tsover_mul(w, agitI), d.f32(GAIN))));
|
|
1054
|
+
const tEval = select(t, __tsover_sub(t, clamp(t, -hl, hl)), f32(SOFT) > .5);
|
|
1055
|
+
const tk = clamp(__tsover_div(__tsover_sub(hl, t), max(__tsover_mul(hl, 2), 1e-6)), 0, 1);
|
|
1056
|
+
const bright = __tsover_sub(1, __tsover_mul(__tsover_mul(.55, tk), f32(SOFT)));
|
|
1057
|
+
const w = __tsover_mul(weightFn(tEval, n, bodyR, AA_W, f32(SOFT)), bright);
|
|
1058
|
+
const e = u32(__tsover_mul(w, f32(GAIN)));
|
|
1059
|
+
if (e > u32(0)) {
|
|
1060
|
+
const idx = u32(__tsover_add(__tsover_mul(py, RES), px));
|
|
1061
|
+
atomicAdd(simLayout.$.accumE[idx], e);
|
|
1062
|
+
atomicAdd(simLayout.$.accumS[idx], u32(__tsover_mul(__tsover_mul(w, agitI), f32(GAIN))));
|
|
1061
1063
|
}
|
|
1062
1064
|
}
|
|
1063
1065
|
}
|
|
@@ -1970,8 +1972,8 @@ function makeBoidsSplatKernel(shape) {
|
|
|
1970
1972
|
},
|
|
1971
1973
|
externals: () => ({
|
|
1972
1974
|
simLayout,
|
|
1973
|
-
d,
|
|
1974
|
-
std,
|
|
1975
|
+
d: data_exports,
|
|
1976
|
+
std: std_exports,
|
|
1975
1977
|
HL,
|
|
1976
1978
|
EXT,
|
|
1977
1979
|
AA_W,
|
|
@@ -1988,23 +1990,23 @@ function makeBoidsSplatKernel(shape) {
|
|
|
1988
1990
|
const boidsSplatKernel = makeBoidsSplatKernel("arrow");
|
|
1989
1991
|
function makeBoidsResolveKernel(colorSpaceMode) {
|
|
1990
1992
|
const mixFn = mixColorsVariants[colorSpaceMode] ?? mixColorsLinear;
|
|
1991
|
-
return
|
|
1993
|
+
return src_default.fn([u32, u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((x, y) => {
|
|
1992
1994
|
"use gpu";
|
|
1993
1995
|
const prm = simLayout.$.params;
|
|
1994
|
-
const idx = __tsover_add(__tsover_mul(y,
|
|
1995
|
-
const eRaw =
|
|
1996
|
-
const sRaw =
|
|
1996
|
+
const idx = __tsover_add(__tsover_mul(y, u32(RES)), x);
|
|
1997
|
+
const eRaw = f32(atomicLoad(simLayout.$.accumE[idx]));
|
|
1998
|
+
const sRaw = f32(atomicLoad(simLayout.$.accumS[idx]));
|
|
1997
1999
|
const energy = __tsover_mul(eRaw, __tsover_div(1, 255));
|
|
1998
|
-
const agitAvg = __tsover_div(sRaw,
|
|
1999
|
-
const col = mixFn(prm.colA, prm.colB,
|
|
2000
|
-
const curA = __tsover_mul(__tsover_sub(1,
|
|
2000
|
+
const agitAvg = __tsover_div(sRaw, max(eRaw, 1));
|
|
2001
|
+
const col = mixFn(prm.colA, prm.colB, clamp(agitAvg, 0, 1));
|
|
2002
|
+
const curA = __tsover_mul(__tsover_sub(1, exp(__tsover_mul(energy, -1.6))), col.w);
|
|
2001
2003
|
const prev = simLayout.$.trailBuf[idx];
|
|
2002
2004
|
const prevA = __tsover_mul(prev.w, prm.trails);
|
|
2003
2005
|
const win = curA >= prevA;
|
|
2004
|
-
const outA =
|
|
2005
|
-
const outRGB =
|
|
2006
|
-
simLayout.$.trailBuf[idx] =
|
|
2007
|
-
|
|
2006
|
+
const outA = max(curA, prevA);
|
|
2007
|
+
const outRGB = select(vec3f(prev.x, prev.y, prev.z), vec3f(col.x, col.y, col.z), win);
|
|
2008
|
+
simLayout.$.trailBuf[idx] = vec4f(outRGB.x, outRGB.y, outRGB.z, outA);
|
|
2009
|
+
textureStore(simLayout.$.outTex, vec2u(x, y), vec4f(outRGB.x, outRGB.y, outRGB.z, outA));
|
|
2008
2010
|
}), {
|
|
2009
2011
|
v: 1,
|
|
2010
2012
|
name: void 0,
|
|
@@ -2452,36 +2454,36 @@ function makeBoidsResolveKernel(colorSpaceMode) {
|
|
|
2452
2454
|
},
|
|
2453
2455
|
externals: () => ({
|
|
2454
2456
|
simLayout,
|
|
2455
|
-
d,
|
|
2457
|
+
d: data_exports,
|
|
2456
2458
|
RES,
|
|
2457
|
-
std,
|
|
2459
|
+
std: std_exports,
|
|
2458
2460
|
mixFn
|
|
2459
2461
|
})
|
|
2460
2462
|
}) && $.f)({})).$name("boidsResolve");
|
|
2461
2463
|
}
|
|
2462
2464
|
const boidsResolveKernel = makeBoidsResolveKernel(2);
|
|
2463
|
-
const boidsUpdateKernel =
|
|
2465
|
+
const boidsUpdateKernel = src_default.fn([u32])(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((i) => {
|
|
2464
2466
|
"use gpu";
|
|
2465
2467
|
const prm = simLayout.$.params;
|
|
2466
2468
|
const self = simLayout.$.agents[i];
|
|
2467
|
-
let pos =
|
|
2468
|
-
let vel =
|
|
2469
|
+
let pos = vec2f(self.x, self.y);
|
|
2470
|
+
let vel = vec2f(self.z, self.w);
|
|
2469
2471
|
const dt = prm.dt;
|
|
2470
|
-
const sVar = __tsover_add(.82, __tsover_mul(hash11(__tsover_add(__tsover_mul(
|
|
2472
|
+
const sVar = __tsover_add(.82, __tsover_mul(hash11(__tsover_add(__tsover_mul(f32(i), .61803), .13)), .4));
|
|
2471
2473
|
const maxSpeedI = __tsover_mul(prm.maxSpeed, sVar);
|
|
2472
|
-
let sep =
|
|
2473
|
-
let ali =
|
|
2474
|
-
let coh =
|
|
2475
|
-
let nCount =
|
|
2476
|
-
let sCount =
|
|
2474
|
+
let sep = vec2f(0, 0);
|
|
2475
|
+
let ali = vec2f(0, 0);
|
|
2476
|
+
let coh = vec2f(0, 0);
|
|
2477
|
+
let nCount = f32(0);
|
|
2478
|
+
let sCount = f32(0);
|
|
2477
2479
|
for (let j = 0; j < MAX_AGENTS; j++) {
|
|
2478
|
-
if (
|
|
2479
|
-
const other = simLayout.$.agents[
|
|
2480
|
-
const opos =
|
|
2480
|
+
if (f32(j) >= prm.count) break;
|
|
2481
|
+
const other = simLayout.$.agents[u32(j)];
|
|
2482
|
+
const opos = vec2f(other.x, other.y);
|
|
2481
2483
|
const off = pos.sub(opos);
|
|
2482
|
-
const dsq =
|
|
2484
|
+
const dsq = dot(off, off);
|
|
2483
2485
|
if (dsq > 1e-7 && dsq < prm.perceptionSq) {
|
|
2484
|
-
ali = ali.add(
|
|
2486
|
+
ali = ali.add(vec2f(other.z, other.w));
|
|
2485
2487
|
coh = coh.add(opos);
|
|
2486
2488
|
nCount = __tsover_add(nCount, 1);
|
|
2487
2489
|
if (dsq < prm.sepRadiusSq) {
|
|
@@ -2490,7 +2492,7 @@ const boidsUpdateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
2490
2492
|
}
|
|
2491
2493
|
}
|
|
2492
2494
|
}
|
|
2493
|
-
let accel =
|
|
2495
|
+
let accel = vec2f(0, 0);
|
|
2494
2496
|
if (nCount > .5) {
|
|
2495
2497
|
const aliSteer = safeSteer(ali.div(nCount), vel, maxSpeedI, prm.maxForce);
|
|
2496
2498
|
const cohSteer = safeSteer(coh.div(nCount).sub(pos), vel, maxSpeedI, prm.maxForce);
|
|
@@ -2498,37 +2500,37 @@ const boidsUpdateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
2498
2500
|
}
|
|
2499
2501
|
if (sCount > .5) accel = accel.add(safeSteer(sep, vel, maxSpeedI, prm.maxForce).mul(prm.sepW));
|
|
2500
2502
|
if (prm.cursorMode > .5) {
|
|
2501
|
-
const cd =
|
|
2502
|
-
const cdsq =
|
|
2503
|
+
const cd = vec2f(prm.cursorX, prm.cursorY).sub(pos);
|
|
2504
|
+
const cdsq = dot(cd, cd);
|
|
2503
2505
|
if (cdsq > 1e-7 && cdsq < prm.cursorRadiusSq) {
|
|
2504
|
-
const cdist =
|
|
2505
|
-
const falloff = __tsover_sub(1, __tsover_div(cdist,
|
|
2506
|
-
const sign =
|
|
2506
|
+
const cdist = sqrt(cdsq);
|
|
2507
|
+
const falloff = __tsover_sub(1, __tsover_div(cdist, max(prm.cursorRadius, 1e-5)));
|
|
2508
|
+
const sign = select(f32(1), f32(-1), prm.cursorMode > 1.5);
|
|
2507
2509
|
accel = accel.add(cd.div(cdist).mul(__tsover_mul(__tsover_mul(sign, falloff), prm.cursorForce)));
|
|
2508
2510
|
}
|
|
2509
2511
|
}
|
|
2510
2512
|
const m = prm.margin;
|
|
2511
2513
|
const tf = prm.turnForce;
|
|
2512
|
-
accel = accel.add(
|
|
2513
|
-
accel = accel.add(
|
|
2514
|
-
accel = accel.add(
|
|
2515
|
-
accel = accel.add(
|
|
2516
|
-
const effort = __tsover_div(
|
|
2517
|
-
const raw =
|
|
2518
|
-
const cooled = __tsover_mul(simLayout.$.agit[i],
|
|
2519
|
-
simLayout.$.agit[i] =
|
|
2514
|
+
accel = accel.add(vec2f(select(f32(0), tf, pos.x < m), f32(0)));
|
|
2515
|
+
accel = accel.add(vec2f(select(f32(0), -tf, pos.x > __tsover_sub(prm.domainX, m)), f32(0)));
|
|
2516
|
+
accel = accel.add(vec2f(f32(0), select(f32(0), tf, pos.y < m)));
|
|
2517
|
+
accel = accel.add(vec2f(f32(0), select(f32(0), -tf, pos.y > __tsover_sub(1, m))));
|
|
2518
|
+
const effort = __tsover_div(length(accel), max(prm.maxForce, 1e-5));
|
|
2519
|
+
const raw = clamp(__tsover_mul(__tsover_sub(effort, AGIT_REST), AGIT_GAIN), 0, 1);
|
|
2520
|
+
const cooled = __tsover_mul(simLayout.$.agit[i], exp(__tsover_mul(dt, -AGIT_COOL)));
|
|
2521
|
+
simLayout.$.agit[i] = max(raw, cooled);
|
|
2520
2522
|
vel = vel.add(accel.mul(dt));
|
|
2521
|
-
const spd =
|
|
2522
|
-
const clamped =
|
|
2523
|
-
vel = vel.div(
|
|
2523
|
+
const spd = length(vel);
|
|
2524
|
+
const clamped = clamp(spd, __tsover_mul(maxSpeedI, .35), maxSpeedI);
|
|
2525
|
+
vel = vel.div(max(spd, 1e-5)).mul(clamped);
|
|
2524
2526
|
pos = pos.add(vel.mul(dt));
|
|
2525
2527
|
const hitX = pos.x < 0 || pos.x > prm.domainX;
|
|
2526
2528
|
const hitY = pos.y < 0 || pos.y > 1;
|
|
2527
|
-
const nvx =
|
|
2528
|
-
const nvy =
|
|
2529
|
-
const cx =
|
|
2530
|
-
const cy =
|
|
2531
|
-
simLayout.$.agents[i] =
|
|
2529
|
+
const nvx = select(vel.x, __tsover_mul(vel.x, -.6), hitX);
|
|
2530
|
+
const nvy = select(vel.y, __tsover_mul(vel.y, -.6), hitY);
|
|
2531
|
+
const cx = clamp(pos.x, 0, prm.domainX);
|
|
2532
|
+
const cy = clamp(pos.y, 0, 1);
|
|
2533
|
+
simLayout.$.agents[i] = vec4f(cx, cy, nvx, nvy);
|
|
2532
2534
|
}), {
|
|
2533
2535
|
v: 1,
|
|
2534
2536
|
name: void 0,
|
|
@@ -4096,10 +4098,10 @@ const boidsUpdateKernel = tgpu.fn([d.u32])(/* @__PURE__ */ (($) => (globalThis._
|
|
|
4096
4098
|
},
|
|
4097
4099
|
externals: () => ({
|
|
4098
4100
|
simLayout,
|
|
4099
|
-
d,
|
|
4101
|
+
d: data_exports,
|
|
4100
4102
|
noise: noise_exports,
|
|
4101
4103
|
MAX_AGENTS,
|
|
4102
|
-
std,
|
|
4104
|
+
std: std_exports,
|
|
4103
4105
|
safeSteer,
|
|
4104
4106
|
AGIT_REST,
|
|
4105
4107
|
AGIT_GAIN,
|
|
@@ -4306,11 +4308,11 @@ const componentDefinition = {
|
|
|
4306
4308
|
const { gpu, getCpuValue, registerComputeTexture, onCleanup } = params;
|
|
4307
4309
|
const root = gpu?.root;
|
|
4308
4310
|
if (!root) return null;
|
|
4309
|
-
const agents = createStateBuffer(root,
|
|
4310
|
-
const agitBuf = createStateBuffer(root,
|
|
4311
|
-
const accumE = createStateBuffer(root,
|
|
4312
|
-
const accumS = createStateBuffer(root,
|
|
4313
|
-
const trailBuf = createStateBuffer(root,
|
|
4311
|
+
const agents = createStateBuffer(root, vec4f, MAX_AGENTS);
|
|
4312
|
+
const agitBuf = createStateBuffer(root, f32, MAX_AGENTS);
|
|
4313
|
+
const accumE = createStateBuffer(root, atomic(u32), RES * RES);
|
|
4314
|
+
const accumS = createStateBuffer(root, atomic(u32), RES * RES);
|
|
4315
|
+
const trailBuf = createStateBuffer(root, vec4f, RES * RES);
|
|
4314
4316
|
const outTex = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(root.createTexture({
|
|
4315
4317
|
size: [RES, RES],
|
|
4316
4318
|
format: STATE_FORMAT
|
|
@@ -4463,8 +4465,8 @@ const componentDefinition = {
|
|
|
4463
4465
|
const colB = getCpuValue("colorB");
|
|
4464
4466
|
const bodyR = Math.min(Math.max(g("size", 1.5), .5), 3) * 2 * INV_RES;
|
|
4465
4467
|
paramsU.write({
|
|
4466
|
-
colA:
|
|
4467
|
-
colB:
|
|
4468
|
+
colA: vec4f(colA?.x ?? .56, colA?.y ?? .77, colA?.z ?? 1, colA?.w ?? 1),
|
|
4469
|
+
colB: vec4f(colB?.x ?? 1, colB?.y ?? .48, colB?.z ?? .85, colB?.w ?? 1),
|
|
4468
4470
|
count,
|
|
4469
4471
|
trails: Math.min(Math.max(g("trails", .35), 0), 1) * .92,
|
|
4470
4472
|
dt,
|