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,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { $t as vec2f, At as pow, Dt as min, Et as max, It as sin, N as unpremultiplyAlpha, Ot as mix, Tt as length, Vt as data_exports, Xt as struct, _t as clamp, an as f32, bt as dot, cn as __export, d as ZERO, et as src_default, gt as atan2, in as vec4f, kt as normalize, mt as abs, nn as vec3f, nt as std_exports, p as call, pt as select, vt as cos, wt as fract } from "./edges-BXNBKxSN.js";
|
|
2
|
+
import { t as animatedTime } from "./porters-DBK1Aipq.js";
|
|
3
|
+
import { c as transformPosition, s as transformEdges } from "./transformations-CsPUHppB.js";
|
|
4
4
|
var raymarch3d_exports = /* @__PURE__ */ __export({
|
|
5
5
|
Distortion3DTrace: () => Distortion3DTrace$1,
|
|
6
6
|
applyDistortion3D: () => applyDistortion3D,
|
|
@@ -8,27 +8,24 @@ var raymarch3d_exports = /* @__PURE__ */ __export({
|
|
|
8
8
|
buildDistortion3dTrace: () => buildDistortion3dTrace,
|
|
9
9
|
distortion3dLighting: () => distortion3dLighting$1
|
|
10
10
|
});
|
|
11
|
-
const Distortion3DTrace$1 = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(
|
|
12
|
-
hitPos:
|
|
13
|
-
normal:
|
|
14
|
-
rd:
|
|
15
|
-
hit:
|
|
11
|
+
const Distortion3DTrace$1 = /* @__PURE__ */ (globalThis.__TYPEGPU_AUTONAME__ ?? ((a) => a))(struct({
|
|
12
|
+
hitPos: vec3f,
|
|
13
|
+
normal: vec3f,
|
|
14
|
+
rd: vec3f,
|
|
15
|
+
hit: f32
|
|
16
16
|
}), "Distortion3DTrace");
|
|
17
|
-
const applyUVMode3d$1 =
|
|
17
|
+
const applyUVMode3d$1 = src_default.fn([vec2f, f32], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, uvMode) => {
|
|
18
18
|
"use gpu";
|
|
19
|
-
const stretched =
|
|
20
|
-
const mirrored =
|
|
21
|
-
const wrapped =
|
|
22
|
-
const tv1 =
|
|
23
|
-
const tv2 =
|
|
24
|
-
const tv3 =
|
|
25
|
-
const transparentVisible =
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const vis1 = std.select(d.f32(1), transparentVisible, uvMode < 1.5);
|
|
30
|
-
const visible = std.select(vis1, d.f32(1), uvMode < .5);
|
|
31
|
-
return d.vec3f(finalUV.x, finalUV.y, visible);
|
|
19
|
+
const stretched = clamp(uv, vec2f(0), vec2f(1));
|
|
20
|
+
const mirrored = abs(fract(uv.mul(.5)).mul(2).sub(1));
|
|
21
|
+
const wrapped = fract(uv);
|
|
22
|
+
const tv1 = select(f32(0), f32(1), uv.y <= 1);
|
|
23
|
+
const tv2 = select(f32(0), tv1, uv.y >= 0);
|
|
24
|
+
const tv3 = select(f32(0), tv2, uv.x <= 1);
|
|
25
|
+
const transparentVisible = select(f32(0), tv3, uv.x >= 0);
|
|
26
|
+
const finalUV = select(select(select(wrapped, mirrored, uvMode < 2.5), uv, uvMode < 1.5), stretched, uvMode < .5);
|
|
27
|
+
const visible = select(select(f32(1), transparentVisible, uvMode < 1.5), f32(1), uvMode < .5);
|
|
28
|
+
return vec3f(finalUV.x, finalUV.y, visible);
|
|
32
29
|
}), {
|
|
33
30
|
v: 1,
|
|
34
31
|
name: void 0,
|
|
@@ -427,34 +424,32 @@ const applyUVMode3d$1 = tgpu.fn([d.vec2f, d.f32], d.vec3f)(/* @__PURE__ */ (($)
|
|
|
427
424
|
"externalNames": ["std", "d"]
|
|
428
425
|
},
|
|
429
426
|
externals: () => ({
|
|
430
|
-
std,
|
|
431
|
-
d
|
|
427
|
+
std: std_exports,
|
|
428
|
+
d: data_exports
|
|
432
429
|
})
|
|
433
430
|
}) && $.f)({}));
|
|
434
|
-
const distortion3dLighting$1 =
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
],
|
|
431
|
+
const distortion3dLighting$1 = src_default.fn([
|
|
432
|
+
vec4f,
|
|
433
|
+
vec3f,
|
|
434
|
+
vec3f,
|
|
435
|
+
f32,
|
|
436
|
+
f32,
|
|
437
|
+
f32,
|
|
438
|
+
f32
|
|
439
|
+
], vec4f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((surfaceColor, normal, rd, hit, uvVisible, glossAmt, lightAmt) => {
|
|
443
440
|
"use gpu";
|
|
444
|
-
const lightDir =
|
|
441
|
+
const lightDir = normalize(vec3f(.4, .7, -.6));
|
|
445
442
|
const viewDir = rd.mul(-1);
|
|
446
|
-
const diffuse =
|
|
447
|
-
const halfVec =
|
|
443
|
+
const diffuse = clamp(dot(normal, lightDir), 0, 1);
|
|
444
|
+
const halfVec = normalize(lightDir.add(viewDir));
|
|
448
445
|
const specPow = __tsover_add(__tsover_mul(glossAmt, 256), 4);
|
|
449
|
-
const specular = __tsover_mul(__tsover_mul(
|
|
450
|
-
const nDotV =
|
|
451
|
-
const fresnel = __tsover_mul(__tsover_mul(
|
|
452
|
-
const
|
|
453
|
-
const
|
|
454
|
-
const col = surfaceColor.xyz.mul(litClamped);
|
|
455
|
-
const colClamped = std.clamp(col, d.vec3f(0), d.vec3f(1));
|
|
446
|
+
const specular = __tsover_mul(__tsover_mul(pow(clamp(dot(normal, halfVec), 0, 1), specPow), glossAmt), 1.5);
|
|
447
|
+
const nDotV = clamp(dot(normal, viewDir), 0, 1);
|
|
448
|
+
const fresnel = __tsover_mul(__tsover_mul(pow(__tsover_sub(1, nDotV), 3), .5), glossAmt);
|
|
449
|
+
const litClamped = clamp(mix(1, __tsover_add(__tsover_add(__tsover_add(.35, __tsover_mul(diffuse, .65)), specular), fresnel), lightAmt), 0, 3);
|
|
450
|
+
const colClamped = clamp(surfaceColor.xyz.mul(litClamped), vec3f(0), vec3f(1));
|
|
456
451
|
const alpha = __tsover_mul(__tsover_mul(hit, surfaceColor.w), uvVisible);
|
|
457
|
-
return
|
|
452
|
+
return vec4f(colClamped.x, colClamped.y, colClamped.z, alpha);
|
|
458
453
|
}), {
|
|
459
454
|
v: 1,
|
|
460
455
|
name: void 0,
|
|
@@ -851,8 +846,8 @@ const distortion3dLighting$1 = tgpu.fn([
|
|
|
851
846
|
"externalNames": ["std", "d"]
|
|
852
847
|
},
|
|
853
848
|
externals: () => ({
|
|
854
|
-
std,
|
|
855
|
-
d
|
|
849
|
+
std: std_exports,
|
|
850
|
+
d: data_exports
|
|
856
851
|
})
|
|
857
852
|
}) && $.f)({}));
|
|
858
853
|
function buildDistortion3dTrace(sdfFn, opts) {
|
|
@@ -860,40 +855,40 @@ function buildDistortion3dTrace(sdfFn, opts) {
|
|
|
860
855
|
const STEP_CAP = opts.stepCap;
|
|
861
856
|
const HIT_EPS = opts.hitEps;
|
|
862
857
|
const MAX_DIST = opts.maxDistance;
|
|
863
|
-
return
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
858
|
+
return src_default.fn([
|
|
859
|
+
vec2f,
|
|
860
|
+
f32,
|
|
861
|
+
vec2f,
|
|
862
|
+
f32
|
|
868
863
|
], Distortion3DTrace$1)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, aspect, center, zoom) => {
|
|
869
864
|
"use gpu";
|
|
870
865
|
const cx = center.x;
|
|
871
866
|
const cy = __tsover_sub(1, center.y);
|
|
872
867
|
const camDist = __tsover_sub(8, __tsover_mul(zoom, .06));
|
|
873
|
-
const ro =
|
|
874
|
-
const rd =
|
|
875
|
-
let rayT =
|
|
876
|
-
let hit =
|
|
877
|
-
const maxDistF =
|
|
868
|
+
const ro = vec3f(0, 0, __tsover_mul(camDist, -1));
|
|
869
|
+
const rd = normalize(vec3f(__tsover_mul(__tsover_sub(uv.x, cx), aspect), __tsover_sub(uv.y, cy), 1.5));
|
|
870
|
+
let rayT = f32(0);
|
|
871
|
+
let hit = f32(0);
|
|
872
|
+
const maxDistF = f32(MAX_DIST);
|
|
878
873
|
for (let i = 0; i < STEPS; i++) {
|
|
879
874
|
const dd = sdfFn(ro.add(rd.mul(rayT)));
|
|
880
875
|
if (dd < HIT_EPS) {
|
|
881
|
-
hit =
|
|
876
|
+
hit = f32(1);
|
|
882
877
|
break;
|
|
883
878
|
}
|
|
884
879
|
if (rayT > maxDistF) break;
|
|
885
|
-
rayT = __tsover_add(rayT,
|
|
880
|
+
rayT = __tsover_add(rayT, min(dd, STEP_CAP));
|
|
886
881
|
}
|
|
887
882
|
const hitPos = ro.add(rd.mul(rayT));
|
|
888
883
|
const h = .001;
|
|
889
884
|
const hn = __tsover_mul(h, -1);
|
|
890
|
-
const k0 = sdfFn(hitPos.add(
|
|
891
|
-
const k1 = sdfFn(hitPos.add(
|
|
892
|
-
const k2 = sdfFn(hitPos.add(
|
|
893
|
-
const k3 = sdfFn(hitPos.add(
|
|
885
|
+
const k0 = sdfFn(hitPos.add(vec3f(h, hn, hn)));
|
|
886
|
+
const k1 = sdfFn(hitPos.add(vec3f(hn, hn, h)));
|
|
887
|
+
const k2 = sdfFn(hitPos.add(vec3f(hn, h, hn)));
|
|
888
|
+
const k3 = sdfFn(hitPos.add(vec3f(h, h, h)));
|
|
894
889
|
return Distortion3DTrace$1({
|
|
895
890
|
hitPos,
|
|
896
|
-
normal:
|
|
891
|
+
normal: normalize(vec3f(1, -1, -1).mul(k0).add(vec3f(-1, -1, 1).mul(k1)).add(vec3f(-1, 1, -1).mul(k2)).add(vec3f(1, 1, 1).mul(k3))),
|
|
897
892
|
rd,
|
|
898
893
|
hit
|
|
899
894
|
});
|
|
@@ -1499,8 +1494,8 @@ function buildDistortion3dTrace(sdfFn, opts) {
|
|
|
1499
1494
|
]
|
|
1500
1495
|
},
|
|
1501
1496
|
externals: () => ({
|
|
1502
|
-
d,
|
|
1503
|
-
std,
|
|
1497
|
+
d: data_exports,
|
|
1498
|
+
std: std_exports,
|
|
1504
1499
|
MAX_DIST,
|
|
1505
1500
|
STEPS,
|
|
1506
1501
|
sdfFn,
|
|
@@ -1556,11 +1551,11 @@ var DEFAULT_RIBBON = JSON.stringify({
|
|
|
1556
1551
|
thickness: 20,
|
|
1557
1552
|
seed: 0
|
|
1558
1553
|
});
|
|
1559
|
-
const f3dRot =
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
],
|
|
1554
|
+
const f3dRot = src_default.fn([
|
|
1555
|
+
vec3f,
|
|
1556
|
+
vec4f,
|
|
1557
|
+
vec4f
|
|
1558
|
+
], vec3f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1) => {
|
|
1564
1559
|
"use gpu";
|
|
1565
1560
|
const cx = rp0.x;
|
|
1566
1561
|
const sx = rp0.y;
|
|
@@ -1568,9 +1563,9 @@ const f3dRot = tgpu.fn([
|
|
|
1568
1563
|
const sy = rp0.w;
|
|
1569
1564
|
const cz = rp1.x;
|
|
1570
1565
|
const sz = rp1.y;
|
|
1571
|
-
const py =
|
|
1572
|
-
const px =
|
|
1573
|
-
return
|
|
1566
|
+
const py = vec3f(__tsover_add(__tsover_mul(p.x, cy), __tsover_mul(p.z, sy)), p.y, __tsover_add(__tsover_mul(__tsover_mul(p.x, sy), -1), __tsover_mul(p.z, cy)));
|
|
1567
|
+
const px = vec3f(py.x, __tsover_sub(__tsover_mul(py.y, cx), __tsover_mul(py.z, sx)), __tsover_add(__tsover_mul(py.y, sx), __tsover_mul(py.z, cx)));
|
|
1568
|
+
return vec3f(__tsover_sub(__tsover_mul(px.x, cz), __tsover_mul(px.y, sz)), __tsover_add(__tsover_mul(px.x, sz), __tsover_mul(px.y, cz)), px.z);
|
|
1574
1569
|
}), {
|
|
1575
1570
|
v: 1,
|
|
1576
1571
|
name: void 0,
|
|
@@ -1853,17 +1848,17 @@ const f3dRot = tgpu.fn([
|
|
|
1853
1848
|
]],
|
|
1854
1849
|
"externalNames": ["d"]
|
|
1855
1850
|
},
|
|
1856
|
-
externals: () => ({ d })
|
|
1851
|
+
externals: () => ({ d: data_exports })
|
|
1857
1852
|
}) && $.f)({}));
|
|
1858
|
-
var sphereSdf =
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
],
|
|
1853
|
+
var sphereSdf = src_default.fn([
|
|
1854
|
+
vec3f,
|
|
1855
|
+
vec4f,
|
|
1856
|
+
vec4f,
|
|
1857
|
+
vec4f,
|
|
1858
|
+
f32
|
|
1859
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, _rp2, _t) => {
|
|
1865
1860
|
"use gpu";
|
|
1866
|
-
return __tsover_sub(
|
|
1861
|
+
return __tsover_sub(length(f3dRot(p, rp0, rp1)), rp1.z);
|
|
1867
1862
|
}), {
|
|
1868
1863
|
v: 1,
|
|
1869
1864
|
name: void 0,
|
|
@@ -1919,21 +1914,21 @@ var sphereSdf = tgpu.fn([
|
|
|
1919
1914
|
"externalNames": ["std", "f3dRot"]
|
|
1920
1915
|
},
|
|
1921
1916
|
externals: () => ({
|
|
1922
|
-
std,
|
|
1917
|
+
std: std_exports,
|
|
1923
1918
|
f3dRot
|
|
1924
1919
|
})
|
|
1925
1920
|
}) && $.f)({}));
|
|
1926
|
-
var sphereUV =
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
],
|
|
1921
|
+
var sphereUV = src_default.fn([
|
|
1922
|
+
vec3f,
|
|
1923
|
+
vec3f,
|
|
1924
|
+
vec4f,
|
|
1925
|
+
vec4f,
|
|
1926
|
+
vec4f,
|
|
1927
|
+
f32
|
|
1928
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, _n, rp0, rp1, _rp2, _t) => {
|
|
1934
1929
|
"use gpu";
|
|
1935
|
-
const n =
|
|
1936
|
-
return
|
|
1930
|
+
const n = normalize(f3dRot(h, rp0, rp1));
|
|
1931
|
+
return vec2f(__tsover_add(__tsover_div(atan2(n.z, n.x), 6.283185307179586), .5), __tsover_mul(__tsover_add(n.y, 1), .5));
|
|
1937
1932
|
}), {
|
|
1938
1933
|
v: 1,
|
|
1939
1934
|
name: void 0,
|
|
@@ -2040,22 +2035,22 @@ var sphereUV = tgpu.fn([
|
|
|
2040
2035
|
]
|
|
2041
2036
|
},
|
|
2042
2037
|
externals: () => ({
|
|
2043
|
-
std,
|
|
2038
|
+
std: std_exports,
|
|
2044
2039
|
f3dRot,
|
|
2045
|
-
d
|
|
2040
|
+
d: data_exports
|
|
2046
2041
|
})
|
|
2047
2042
|
}) && $.f)({}));
|
|
2048
|
-
var torusSdf =
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
],
|
|
2043
|
+
var torusSdf = src_default.fn([
|
|
2044
|
+
vec3f,
|
|
2045
|
+
vec4f,
|
|
2046
|
+
vec4f,
|
|
2047
|
+
vec4f,
|
|
2048
|
+
f32
|
|
2049
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, _rp2, _t) => {
|
|
2055
2050
|
"use gpu";
|
|
2056
2051
|
const rp = f3dRot(p, rp0, rp1);
|
|
2057
|
-
const q =
|
|
2058
|
-
return __tsover_sub(
|
|
2052
|
+
const q = vec2f(__tsover_sub(length(vec2f(rp.x, rp.z)), rp1.z), rp.y);
|
|
2053
|
+
return __tsover_sub(length(q), rp1.w);
|
|
2059
2054
|
}), {
|
|
2060
2055
|
v: 1,
|
|
2061
2056
|
name: void 0,
|
|
@@ -2173,23 +2168,23 @@ var torusSdf = tgpu.fn([
|
|
|
2173
2168
|
},
|
|
2174
2169
|
externals: () => ({
|
|
2175
2170
|
f3dRot,
|
|
2176
|
-
d,
|
|
2177
|
-
std
|
|
2171
|
+
d: data_exports,
|
|
2172
|
+
std: std_exports
|
|
2178
2173
|
})
|
|
2179
2174
|
}) && $.f)({}));
|
|
2180
|
-
var torusUV =
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
],
|
|
2175
|
+
var torusUV = src_default.fn([
|
|
2176
|
+
vec3f,
|
|
2177
|
+
vec3f,
|
|
2178
|
+
vec4f,
|
|
2179
|
+
vec4f,
|
|
2180
|
+
vec4f,
|
|
2181
|
+
f32
|
|
2182
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, _n, rp0, rp1, _rp2, _t) => {
|
|
2188
2183
|
"use gpu";
|
|
2189
2184
|
const rp = f3dRot(h, rp0, rp1);
|
|
2190
|
-
const u = __tsover_add(__tsover_div(
|
|
2191
|
-
const ringDist = __tsover_sub(
|
|
2192
|
-
return
|
|
2185
|
+
const u = __tsover_add(__tsover_div(atan2(rp.z, rp.x), 6.283185307179586), .5);
|
|
2186
|
+
const ringDist = __tsover_sub(length(vec2f(rp.x, rp.z)), rp1.z);
|
|
2187
|
+
return vec2f(u, __tsover_add(__tsover_div(atan2(rp.y, ringDist), 6.283185307179586), .5));
|
|
2193
2188
|
}), {
|
|
2194
2189
|
v: 1,
|
|
2195
2190
|
name: void 0,
|
|
@@ -2343,25 +2338,25 @@ var torusUV = tgpu.fn([
|
|
|
2343
2338
|
},
|
|
2344
2339
|
externals: () => ({
|
|
2345
2340
|
f3dRot,
|
|
2346
|
-
std,
|
|
2347
|
-
d
|
|
2341
|
+
std: std_exports,
|
|
2342
|
+
d: data_exports
|
|
2348
2343
|
})
|
|
2349
2344
|
}) && $.f)({}));
|
|
2350
|
-
var boxSdf =
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
],
|
|
2345
|
+
var boxSdf = src_default.fn([
|
|
2346
|
+
vec3f,
|
|
2347
|
+
vec4f,
|
|
2348
|
+
vec4f,
|
|
2349
|
+
vec4f,
|
|
2350
|
+
f32
|
|
2351
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, rp2, _t) => {
|
|
2357
2352
|
"use gpu";
|
|
2358
2353
|
const rp = f3dRot(p, rp0, rp1);
|
|
2359
2354
|
const rounding = rp2.y;
|
|
2360
|
-
const qx = __tsover_add(__tsover_sub(
|
|
2361
|
-
const qy = __tsover_add(__tsover_sub(
|
|
2362
|
-
const qz = __tsover_add(__tsover_sub(
|
|
2363
|
-
const outer =
|
|
2364
|
-
const inner =
|
|
2355
|
+
const qx = __tsover_add(__tsover_sub(abs(rp.x), rp1.z), rounding);
|
|
2356
|
+
const qy = __tsover_add(__tsover_sub(abs(rp.y), rp1.w), rounding);
|
|
2357
|
+
const qz = __tsover_add(__tsover_sub(abs(rp.z), rp2.x), rounding);
|
|
2358
|
+
const outer = length(vec3f(max(qx, f32(0)), max(qy, f32(0)), max(qz, f32(0))));
|
|
2359
|
+
const inner = min(max(qx, max(qy, qz)), f32(0));
|
|
2365
2360
|
return __tsover_sub(__tsover_add(outer, inner), rounding);
|
|
2366
2361
|
}), {
|
|
2367
2362
|
v: 1,
|
|
@@ -2635,34 +2630,33 @@ var boxSdf = tgpu.fn([
|
|
|
2635
2630
|
},
|
|
2636
2631
|
externals: () => ({
|
|
2637
2632
|
f3dRot,
|
|
2638
|
-
std,
|
|
2639
|
-
d
|
|
2633
|
+
std: std_exports,
|
|
2634
|
+
d: data_exports
|
|
2640
2635
|
})
|
|
2641
2636
|
}) && $.f)({}));
|
|
2642
|
-
var boxUV =
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
],
|
|
2637
|
+
var boxUV = src_default.fn([
|
|
2638
|
+
vec3f,
|
|
2639
|
+
vec3f,
|
|
2640
|
+
vec4f,
|
|
2641
|
+
vec4f,
|
|
2642
|
+
vec4f,
|
|
2643
|
+
f32
|
|
2644
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, n, rp0, rp1, rp2, _t) => {
|
|
2650
2645
|
"use gpu";
|
|
2651
2646
|
const rp = f3dRot(h, rp0, rp1);
|
|
2652
2647
|
const rn = f3dRot(n, rp0, rp1);
|
|
2653
|
-
const an =
|
|
2648
|
+
const an = vec3f(abs(rn.x), abs(rn.y), abs(rn.z));
|
|
2654
2649
|
const hx = rp1.z;
|
|
2655
2650
|
const hy = rp1.w;
|
|
2656
2651
|
const hz = rp2.x;
|
|
2657
|
-
const scaleX = __tsover_div(.5,
|
|
2658
|
-
const scaleY = __tsover_div(.5,
|
|
2659
|
-
const scaleZ = __tsover_div(.5,
|
|
2660
|
-
const uvX =
|
|
2661
|
-
const uvY =
|
|
2662
|
-
const uvZ =
|
|
2663
|
-
const pickXZ =
|
|
2664
|
-
|
|
2665
|
-
return std.select(pickYZ, pickXZ, an.x > an.y);
|
|
2652
|
+
const scaleX = __tsover_div(.5, max(hy, hz));
|
|
2653
|
+
const scaleY = __tsover_div(.5, max(hx, hz));
|
|
2654
|
+
const scaleZ = __tsover_div(.5, max(hx, hy));
|
|
2655
|
+
const uvX = vec2f(__tsover_add(__tsover_mul(rp.z, scaleX), .5), __tsover_add(__tsover_mul(rp.y, scaleX), .5));
|
|
2656
|
+
const uvY = vec2f(__tsover_add(__tsover_mul(rp.x, scaleY), .5), __tsover_add(__tsover_mul(rp.z, scaleY), .5));
|
|
2657
|
+
const uvZ = vec2f(__tsover_add(__tsover_mul(rp.x, scaleZ), .5), __tsover_add(__tsover_mul(rp.y, scaleZ), .5));
|
|
2658
|
+
const pickXZ = select(uvZ, uvX, an.x > an.z);
|
|
2659
|
+
return select(select(uvZ, uvY, an.y > an.z), pickXZ, an.x > an.y);
|
|
2666
2660
|
}), {
|
|
2667
2661
|
v: 1,
|
|
2668
2662
|
name: void 0,
|
|
@@ -3072,23 +3066,23 @@ var boxUV = tgpu.fn([
|
|
|
3072
3066
|
},
|
|
3073
3067
|
externals: () => ({
|
|
3074
3068
|
f3dRot,
|
|
3075
|
-
d,
|
|
3076
|
-
std
|
|
3069
|
+
d: data_exports,
|
|
3070
|
+
std: std_exports
|
|
3077
3071
|
})
|
|
3078
3072
|
}) && $.f)({}));
|
|
3079
|
-
var capsuleSdf =
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
],
|
|
3073
|
+
var capsuleSdf = src_default.fn([
|
|
3074
|
+
vec3f,
|
|
3075
|
+
vec4f,
|
|
3076
|
+
vec4f,
|
|
3077
|
+
vec4f,
|
|
3078
|
+
f32
|
|
3079
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, _rp2, _t) => {
|
|
3086
3080
|
"use gpu";
|
|
3087
3081
|
const rp = f3dRot(p, rp0, rp1);
|
|
3088
3082
|
const radius = rp1.z;
|
|
3089
3083
|
const halfHeight = rp1.w;
|
|
3090
|
-
const clampedY =
|
|
3091
|
-
return __tsover_sub(
|
|
3084
|
+
const clampedY = clamp(rp.y, __tsover_mul(halfHeight, -1), halfHeight);
|
|
3085
|
+
return __tsover_sub(length(vec3f(rp.x, __tsover_sub(rp.y, clampedY), rp.z)), radius);
|
|
3092
3086
|
}), {
|
|
3093
3087
|
v: 1,
|
|
3094
3088
|
name: void 0,
|
|
@@ -3229,23 +3223,23 @@ var capsuleSdf = tgpu.fn([
|
|
|
3229
3223
|
},
|
|
3230
3224
|
externals: () => ({
|
|
3231
3225
|
f3dRot,
|
|
3232
|
-
std,
|
|
3233
|
-
d
|
|
3226
|
+
std: std_exports,
|
|
3227
|
+
d: data_exports
|
|
3234
3228
|
})
|
|
3235
3229
|
}) && $.f)({}));
|
|
3236
|
-
var capsuleUV =
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
],
|
|
3230
|
+
var capsuleUV = src_default.fn([
|
|
3231
|
+
vec3f,
|
|
3232
|
+
vec3f,
|
|
3233
|
+
vec4f,
|
|
3234
|
+
vec4f,
|
|
3235
|
+
vec4f,
|
|
3236
|
+
f32
|
|
3237
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, _n, rp0, rp1, _rp2, _t) => {
|
|
3244
3238
|
"use gpu";
|
|
3245
3239
|
const rp = f3dRot(h, rp0, rp1);
|
|
3246
|
-
const u = __tsover_add(__tsover_div(
|
|
3240
|
+
const u = __tsover_add(__tsover_div(atan2(rp.z, rp.x), 6.283185307179586), .5);
|
|
3247
3241
|
const span = __tsover_add(rp1.w, rp1.z);
|
|
3248
|
-
return
|
|
3242
|
+
return vec2f(u, clamp(__tsover_add(__tsover_mul(__tsover_div(rp.y, span), .5), .5), 0, 1));
|
|
3249
3243
|
}), {
|
|
3250
3244
|
v: 1,
|
|
3251
3245
|
name: void 0,
|
|
@@ -3388,31 +3382,31 @@ var capsuleUV = tgpu.fn([
|
|
|
3388
3382
|
},
|
|
3389
3383
|
externals: () => ({
|
|
3390
3384
|
f3dRot,
|
|
3391
|
-
std,
|
|
3392
|
-
d
|
|
3385
|
+
std: std_exports,
|
|
3386
|
+
d: data_exports
|
|
3393
3387
|
})
|
|
3394
3388
|
}) && $.f)({}));
|
|
3395
|
-
var mobiusSdf =
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
],
|
|
3389
|
+
var mobiusSdf = src_default.fn([
|
|
3390
|
+
vec3f,
|
|
3391
|
+
vec4f,
|
|
3392
|
+
vec4f,
|
|
3393
|
+
vec4f,
|
|
3394
|
+
f32
|
|
3395
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, rp2, _t) => {
|
|
3402
3396
|
"use gpu";
|
|
3403
3397
|
const rp = f3dRot(p, rp0, rp1);
|
|
3404
3398
|
const ringRadius = rp1.z;
|
|
3405
3399
|
const halfWidth = rp1.w;
|
|
3406
3400
|
const thickness = rp2.x;
|
|
3407
|
-
const phi =
|
|
3408
|
-
const spine =
|
|
3409
|
-
const dvec =
|
|
3401
|
+
const phi = atan2(rp.z, rp.x);
|
|
3402
|
+
const spine = vec3f(__tsover_mul(cos(phi), ringRadius), 0, __tsover_mul(sin(phi), ringRadius));
|
|
3403
|
+
const dvec = vec3f(__tsover_sub(rp.x, spine.x), __tsover_sub(rp.y, spine.y), __tsover_sub(rp.z, spine.z));
|
|
3410
3404
|
const halfPhi = __tsover_mul(phi, .5);
|
|
3411
|
-
const ev =
|
|
3412
|
-
const vProj =
|
|
3413
|
-
const du =
|
|
3414
|
-
const perp =
|
|
3415
|
-
return __tsover_sub(
|
|
3405
|
+
const ev = vec3f(__tsover_mul(cos(phi), cos(halfPhi)), sin(halfPhi), __tsover_mul(sin(phi), cos(halfPhi)));
|
|
3406
|
+
const vProj = dot(dvec, ev);
|
|
3407
|
+
const du = max(__tsover_sub(abs(vProj), halfWidth), f32(0));
|
|
3408
|
+
const perp = vec3f(__tsover_sub(dvec.x, __tsover_mul(ev.x, vProj)), __tsover_sub(dvec.y, __tsover_mul(ev.y, vProj)), __tsover_sub(dvec.z, __tsover_mul(ev.z, vProj)));
|
|
3409
|
+
return __tsover_sub(length(vec2f(du, length(perp))), thickness);
|
|
3416
3410
|
}), {
|
|
3417
3411
|
v: 1,
|
|
3418
3412
|
name: void 0,
|
|
@@ -3834,29 +3828,28 @@ var mobiusSdf = tgpu.fn([
|
|
|
3834
3828
|
},
|
|
3835
3829
|
externals: () => ({
|
|
3836
3830
|
f3dRot,
|
|
3837
|
-
std,
|
|
3838
|
-
d
|
|
3831
|
+
std: std_exports,
|
|
3832
|
+
d: data_exports
|
|
3839
3833
|
})
|
|
3840
3834
|
}) && $.f)({}));
|
|
3841
|
-
var mobiusUV =
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
],
|
|
3835
|
+
var mobiusUV = src_default.fn([
|
|
3836
|
+
vec3f,
|
|
3837
|
+
vec3f,
|
|
3838
|
+
vec4f,
|
|
3839
|
+
vec4f,
|
|
3840
|
+
vec4f,
|
|
3841
|
+
f32
|
|
3842
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, _n, rp0, rp1, _rp2, _t) => {
|
|
3849
3843
|
"use gpu";
|
|
3850
3844
|
const rp = f3dRot(h, rp0, rp1);
|
|
3851
3845
|
const ringRadius = rp1.z;
|
|
3852
3846
|
const halfWidth = rp1.w;
|
|
3853
|
-
const phi =
|
|
3854
|
-
const spine =
|
|
3855
|
-
const dvec =
|
|
3847
|
+
const phi = atan2(rp.z, rp.x);
|
|
3848
|
+
const spine = vec3f(__tsover_mul(cos(phi), ringRadius), 0, __tsover_mul(sin(phi), ringRadius));
|
|
3849
|
+
const dvec = vec3f(__tsover_sub(rp.x, spine.x), __tsover_sub(rp.y, spine.y), __tsover_sub(rp.z, spine.z));
|
|
3856
3850
|
const halfPhi = __tsover_mul(phi, .5);
|
|
3857
|
-
const
|
|
3858
|
-
|
|
3859
|
-
return d.vec2f(__tsover_add(__tsover_div(phi, 6.283185307179586), .5), __tsover_add(__tsover_mul(__tsover_div(vProj, halfWidth), .5), .5));
|
|
3851
|
+
const vProj = dot(dvec, vec3f(__tsover_mul(cos(phi), cos(halfPhi)), sin(halfPhi), __tsover_mul(sin(phi), cos(halfPhi))));
|
|
3852
|
+
return vec2f(__tsover_add(__tsover_div(phi, 6.283185307179586), .5), __tsover_add(__tsover_mul(__tsover_div(vProj, halfWidth), .5), .5));
|
|
3860
3853
|
}), {
|
|
3861
3854
|
v: 1,
|
|
3862
3855
|
name: void 0,
|
|
@@ -4172,17 +4165,17 @@ var mobiusUV = tgpu.fn([
|
|
|
4172
4165
|
},
|
|
4173
4166
|
externals: () => ({
|
|
4174
4167
|
f3dRot,
|
|
4175
|
-
std,
|
|
4176
|
-
d
|
|
4168
|
+
std: std_exports,
|
|
4169
|
+
d: data_exports
|
|
4177
4170
|
})
|
|
4178
4171
|
}) && $.f)({}));
|
|
4179
|
-
var ribbonSdf =
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
],
|
|
4172
|
+
var ribbonSdf = src_default.fn([
|
|
4173
|
+
vec3f,
|
|
4174
|
+
vec4f,
|
|
4175
|
+
vec4f,
|
|
4176
|
+
vec4f,
|
|
4177
|
+
f32
|
|
4178
|
+
], f32)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((p, rp0, rp1, _rp2, t) => {
|
|
4186
4179
|
"use gpu";
|
|
4187
4180
|
const angleRad = rp0.x;
|
|
4188
4181
|
const twist = rp0.y;
|
|
@@ -4190,17 +4183,17 @@ var ribbonSdf = tgpu.fn([
|
|
|
4190
4183
|
const thickness = rp1.x;
|
|
4191
4184
|
const phase = rp1.y;
|
|
4192
4185
|
const lipschitz = rp1.z;
|
|
4193
|
-
const cosA =
|
|
4194
|
-
const sinA =
|
|
4186
|
+
const cosA = cos(angleRad);
|
|
4187
|
+
const sinA = sin(angleRad);
|
|
4195
4188
|
const rpx = __tsover_add(__tsover_mul(p.x, cosA), __tsover_mul(p.y, sinA));
|
|
4196
4189
|
const rpy = __tsover_add(__tsover_mul(__tsover_mul(p.x, sinA), -1), __tsover_mul(p.y, cosA));
|
|
4197
4190
|
const twistAngle = __tsover_add(__tsover_add(__tsover_mul(rpx, twist), phase), __tsover_mul(t, TWIST_SPEED));
|
|
4198
|
-
const ca =
|
|
4199
|
-
const sa =
|
|
4191
|
+
const ca = cos(twistAngle);
|
|
4192
|
+
const sa = sin(twistAngle);
|
|
4200
4193
|
const localU = __tsover_add(__tsover_mul(rpy, ca), __tsover_mul(p.z, sa));
|
|
4201
4194
|
const localV = __tsover_add(__tsover_mul(__tsover_mul(rpy, sa), -1), __tsover_mul(p.z, ca));
|
|
4202
|
-
const du =
|
|
4203
|
-
return __tsover_div(__tsover_sub(
|
|
4195
|
+
const du = max(__tsover_sub(abs(localU), halfW), f32(0));
|
|
4196
|
+
return __tsover_div(__tsover_sub(length(vec2f(du, localV)), thickness), lipschitz);
|
|
4204
4197
|
}), {
|
|
4205
4198
|
v: 1,
|
|
4206
4199
|
name: void 0,
|
|
@@ -4550,35 +4543,34 @@ var ribbonSdf = tgpu.fn([
|
|
|
4550
4543
|
]
|
|
4551
4544
|
},
|
|
4552
4545
|
externals: () => ({
|
|
4553
|
-
std,
|
|
4546
|
+
std: std_exports,
|
|
4554
4547
|
TWIST_SPEED,
|
|
4555
|
-
d
|
|
4548
|
+
d: data_exports
|
|
4556
4549
|
})
|
|
4557
4550
|
}) && $.f)({}));
|
|
4558
|
-
var ribbonUV =
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
],
|
|
4551
|
+
var ribbonUV = src_default.fn([
|
|
4552
|
+
vec3f,
|
|
4553
|
+
vec3f,
|
|
4554
|
+
vec4f,
|
|
4555
|
+
vec4f,
|
|
4556
|
+
vec4f,
|
|
4557
|
+
f32
|
|
4558
|
+
], vec2f)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((h, _n, rp0, rp1, _rp2, t) => {
|
|
4566
4559
|
"use gpu";
|
|
4567
4560
|
const angleRad = rp0.x;
|
|
4568
4561
|
const twist = rp0.y;
|
|
4569
4562
|
const halfW = rp0.z;
|
|
4570
4563
|
const width = rp0.w;
|
|
4571
4564
|
const phase = rp1.y;
|
|
4572
|
-
const cosA =
|
|
4573
|
-
const sinA =
|
|
4565
|
+
const cosA = cos(angleRad);
|
|
4566
|
+
const sinA = sin(angleRad);
|
|
4574
4567
|
const rpx = __tsover_add(__tsover_mul(h.x, cosA), __tsover_mul(h.y, sinA));
|
|
4575
4568
|
const rpy = __tsover_add(__tsover_mul(__tsover_mul(h.x, sinA), -1), __tsover_mul(h.y, cosA));
|
|
4576
4569
|
const twistAngle = __tsover_add(__tsover_add(__tsover_mul(rpx, twist), phase), __tsover_mul(t, TWIST_SPEED));
|
|
4577
|
-
const ca =
|
|
4578
|
-
const sa =
|
|
4579
|
-
const
|
|
4580
|
-
|
|
4581
|
-
return d.vec2f(__tsover_add(__tsover_mul(rpx, .15), .5), __tsover_add(__tsover_div(localUClamped, width), .5));
|
|
4570
|
+
const ca = cos(twistAngle);
|
|
4571
|
+
const sa = sin(twistAngle);
|
|
4572
|
+
const localUClamped = max(min(__tsover_add(__tsover_mul(rpy, ca), __tsover_mul(h.z, sa)), halfW), __tsover_mul(halfW, -1));
|
|
4573
|
+
return vec2f(__tsover_add(__tsover_mul(rpx, .15), .5), __tsover_add(__tsover_div(localUClamped, width), .5));
|
|
4582
4574
|
}), {
|
|
4583
4575
|
v: 1,
|
|
4584
4576
|
name: void 0,
|
|
@@ -4888,9 +4880,9 @@ var ribbonUV = tgpu.fn([
|
|
|
4888
4880
|
]
|
|
4889
4881
|
},
|
|
4890
4882
|
externals: () => ({
|
|
4891
|
-
std,
|
|
4883
|
+
std: std_exports,
|
|
4892
4884
|
TWIST_SPEED,
|
|
4893
|
-
d
|
|
4885
|
+
d: data_exports
|
|
4894
4886
|
})
|
|
4895
4887
|
}) && $.f)({}));
|
|
4896
4888
|
var named = (fn, name) => fn.$name(name);
|
|
@@ -4947,44 +4939,44 @@ var SHAPES = {
|
|
|
4947
4939
|
function buildForm3dTrace(shape) {
|
|
4948
4940
|
const STEPS = shape.steps, STEP_CAP = shape.stepCap, HIT_EPS = shape.hitEps, MAX_DIST = 20;
|
|
4949
4941
|
const sdf = shape.sdf;
|
|
4950
|
-
return
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4942
|
+
return src_default.fn([
|
|
4943
|
+
vec2f,
|
|
4944
|
+
f32,
|
|
4945
|
+
vec2f,
|
|
4946
|
+
f32,
|
|
4947
|
+
vec4f,
|
|
4948
|
+
vec4f,
|
|
4949
|
+
vec4f,
|
|
4950
|
+
f32
|
|
4959
4951
|
], Distortion3DTrace)(/* @__PURE__ */ (($) => (globalThis.__TYPEGPU_META__ ??= /* @__PURE__ */ new WeakMap()).set($.f = ((uv, aspect, center, zoom, rp0, rp1, rp2, t) => {
|
|
4960
4952
|
"use gpu";
|
|
4961
4953
|
const cx = center.x;
|
|
4962
4954
|
const cy = __tsover_sub(1, center.y);
|
|
4963
4955
|
const camDist = __tsover_sub(8, __tsover_mul(zoom, .06));
|
|
4964
|
-
const ro =
|
|
4965
|
-
const rd =
|
|
4966
|
-
let rayT =
|
|
4967
|
-
let hit =
|
|
4968
|
-
const maxDistF =
|
|
4956
|
+
const ro = vec3f(0, 0, __tsover_mul(camDist, -1));
|
|
4957
|
+
const rd = normalize(vec3f(__tsover_mul(__tsover_sub(uv.x, cx), aspect), __tsover_sub(uv.y, cy), 1.5));
|
|
4958
|
+
let rayT = f32(0);
|
|
4959
|
+
let hit = f32(0);
|
|
4960
|
+
const maxDistF = f32(MAX_DIST);
|
|
4969
4961
|
for (let i = 0; i < STEPS; i++) {
|
|
4970
4962
|
const dd = sdf(ro.add(rd.mul(rayT)), rp0, rp1, rp2, t);
|
|
4971
4963
|
if (dd < HIT_EPS) {
|
|
4972
|
-
hit =
|
|
4964
|
+
hit = f32(1);
|
|
4973
4965
|
break;
|
|
4974
4966
|
}
|
|
4975
4967
|
if (rayT > maxDistF) break;
|
|
4976
|
-
rayT = __tsover_add(rayT,
|
|
4968
|
+
rayT = __tsover_add(rayT, min(dd, STEP_CAP));
|
|
4977
4969
|
}
|
|
4978
4970
|
const hitPos = ro.add(rd.mul(rayT));
|
|
4979
4971
|
const hh = .001;
|
|
4980
4972
|
const hn = __tsover_mul(hh, -1);
|
|
4981
|
-
const k0 = sdf(hitPos.add(
|
|
4982
|
-
const k1 = sdf(hitPos.add(
|
|
4983
|
-
const k2 = sdf(hitPos.add(
|
|
4984
|
-
const k3 = sdf(hitPos.add(
|
|
4973
|
+
const k0 = sdf(hitPos.add(vec3f(hh, hn, hn)), rp0, rp1, rp2, t);
|
|
4974
|
+
const k1 = sdf(hitPos.add(vec3f(hn, hn, hh)), rp0, rp1, rp2, t);
|
|
4975
|
+
const k2 = sdf(hitPos.add(vec3f(hn, hh, hn)), rp0, rp1, rp2, t);
|
|
4976
|
+
const k3 = sdf(hitPos.add(vec3f(hh, hh, hh)), rp0, rp1, rp2, t);
|
|
4985
4977
|
return Distortion3DTrace({
|
|
4986
4978
|
hitPos,
|
|
4987
|
-
normal:
|
|
4979
|
+
normal: normalize(vec3f(1, -1, -1).mul(k0).add(vec3f(-1, -1, 1).mul(k1)).add(vec3f(-1, 1, -1).mul(k2)).add(vec3f(1, 1, 1).mul(k3))),
|
|
4988
4980
|
rd,
|
|
4989
4981
|
hit
|
|
4990
4982
|
});
|
|
@@ -5631,8 +5623,8 @@ function buildForm3dTrace(shape) {
|
|
|
5631
5623
|
]
|
|
5632
5624
|
},
|
|
5633
5625
|
externals: () => ({
|
|
5634
|
-
d,
|
|
5635
|
-
std,
|
|
5626
|
+
d: data_exports,
|
|
5627
|
+
std: std_exports,
|
|
5636
5628
|
MAX_DIST,
|
|
5637
5629
|
STEPS,
|
|
5638
5630
|
sdf,
|
|
@@ -5668,7 +5660,7 @@ const componentDefinition = {
|
|
|
5668
5660
|
animatedTime: { speed: "speed" },
|
|
5669
5661
|
extraFields: {
|
|
5670
5662
|
_f3p0: {
|
|
5671
|
-
schema:
|
|
5663
|
+
schema: vec4f,
|
|
5672
5664
|
initial: [
|
|
5673
5665
|
1,
|
|
5674
5666
|
0,
|
|
@@ -5677,7 +5669,7 @@ const componentDefinition = {
|
|
|
5677
5669
|
]
|
|
5678
5670
|
},
|
|
5679
5671
|
_f3p1: {
|
|
5680
|
-
schema:
|
|
5672
|
+
schema: vec4f,
|
|
5681
5673
|
initial: [
|
|
5682
5674
|
1,
|
|
5683
5675
|
0,
|
|
@@ -5686,7 +5678,7 @@ const componentDefinition = {
|
|
|
5686
5678
|
]
|
|
5687
5679
|
},
|
|
5688
5680
|
_f3p2: {
|
|
5689
|
-
schema:
|
|
5681
|
+
schema: vec4f,
|
|
5690
5682
|
initial: [
|
|
5691
5683
|
.3,
|
|
5692
5684
|
.02,
|