shaders 3.0.451 → 3.0.453
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-4jt7bNoF.js → AngularBlur-B0m-LKoD.js} +2 -2
- package/dist/core/{Arc-DXIfbBgd.js → Arc-DhhcsMqr.js} +3 -3
- package/dist/core/{Ascii-GDof03Ca.js → Ascii-BiFuRRQ1.js} +2 -2
- package/dist/core/{Aurora-CS4vewUW.js → Aurora-B35I8qRz.js} +4 -4
- package/dist/core/{BarShift-BtnYLQ0B.js → BarShift-C_waFkRO.js} +3 -3
- package/dist/core/{BarnDoors-Dw9K-amf.js → BarnDoors-Cnyfsla8.js} +2 -2
- package/dist/core/{Beam-D_cyaMjJ.js → Beam-BPBmQMGD.js} +2 -2
- package/dist/core/{Bend-CSs5UIh8.js → Bend-Bq1Qlhq4.js} +2 -2
- package/dist/core/{Blob-h25zA5WH.js → Blob-BtInePsq.js} +3 -3
- package/dist/core/{BlockDissolve-CKN_KvLP.js → BlockDissolve-i8V6gmZw.js} +3 -3
- package/dist/core/{BlockNoise-DhKyd_F7.js → BlockNoise-BfDNfyBP.js} +5 -5
- package/dist/core/{BlueNoise-Auhzq4x5.js → BlueNoise-CNLIGPMW.js} +4 -4
- package/dist/core/{Blur-CcxMqYsu.js → Blur-B8NcZJdr.js} +3 -3
- package/dist/core/{Boids-D51U46GF.js → Boids-D51ZdvH0.js} +5 -5
- package/dist/core/{BokehBlur-Cfaqbh3I.js → BokehBlur-DO4V8nZ-.js} +4 -4
- package/dist/core/{BrickPattern-tASwilX0.js → BrickPattern-D21Nqxcj.js} +3 -3
- package/dist/core/{BrightnessContrast-ZCKqJW7i.js → BrightnessContrast-QxVeVMih.js} +1 -1
- package/dist/core/{BrushedMetal-B6gSVB28.js → BrushedMetal-Xq4jMVz1.js} +142 -35
- package/dist/core/{Bulge-dCYtWP4S.js → Bulge-CdCqTfrp.js} +2 -2
- package/dist/core/{CRTScreen-CVY1lOGL.js → CRTScreen-D7WSk5fJ.js} +1 -1
- package/dist/core/{CarbonFiber-Do9EONKv.js → CarbonFiber-Dg-XleHg.js} +141 -34
- package/dist/core/{Chalkboard-0hyyGnYl.js → Chalkboard-B_YRavSR.js} +2 -2
- package/dist/core/{ChannelBlur-DcZKCKXi.js → ChannelBlur-BmEILWdn.js} +2 -2
- package/dist/core/{CheckerWipe-BIE62tJ1.js → CheckerWipe-Dbt7TTDK.js} +2 -2
- package/dist/core/{Checkerboard-CRnfu63u.js → Checkerboard-BnWdSZLM.js} +2 -2
- package/dist/core/{Chevron-Ld_v4z9T.js → Chevron-DsJK3THV.js} +3 -3
- package/dist/core/{ChromaFlow-CTWeauIr.js → ChromaFlow-Bj4rfeWl.js} +2 -2
- package/dist/core/{ChromaticAberration-CxuOb68m.js → ChromaticAberration-C2UtSgN3.js} +2 -2
- package/dist/core/Chrome-CSrC5yk_.js +3692 -0
- package/dist/core/{Circle-XP1B5rsN.js → Circle-CJ4IbgBH.js} +3 -3
- package/dist/core/{ColorWheel-CFU_OmOW.js → ColorWheel-C_YLOL93.js} +3 -3
- package/dist/core/{CompressionArtifacts-Bc9xTdQP.js → CompressionArtifacts-BXto-pLr.js} +2 -2
- package/dist/core/{ConcentricSpin-DTJytpAk.js → ConcentricSpin-1tArUXYX.js} +3 -3
- package/dist/core/{ConicGradient-C-4uDmQj.js → ConicGradient-Tw-pg593.js} +3 -3
- package/dist/core/{ContourLines-C8p6f-1y.js → ContourLines-CBFm0hjl.js} +2 -2
- package/dist/core/{CornerPin-CB92kX10.js → CornerPin-BNgPHIHY.js} +2 -2
- package/dist/core/{Crescent-Dk4nlG8T.js → Crescent-BKcpTzwd.js} +3 -3
- package/dist/core/{Cross-DsnI1U8g.js → Cross-CDUSIOgx.js} +3 -3
- package/dist/core/{Crystal-CR_sG2y7.js → Crystal-DN2WgBrm.js} +6 -6
- package/dist/core/{CurlNoise-DJ27ih0F.js → CurlNoise-RsATuC8w.js} +5 -5
- package/dist/core/{CursorRipples-CuO3sZga.js → CursorRipples-DbtJtDDl.js} +3 -3
- package/dist/core/{CursorTrail-d4xx4QpM.js → CursorTrail-yoPFtwk9.js} +4 -4
- package/dist/core/{DataMosh-BhvE-2yC.js → DataMosh-DabFQ-B5.js} +2 -2
- package/dist/core/{DiamondGradient-CtOVKrYf.js → DiamondGradient-DbaUt2tC.js} +3 -3
- package/dist/core/{DiamondWipe-D-yiQBVj.js → DiamondWipe-Jth0vS7V.js} +2 -2
- package/dist/core/{DiffuseBlur-BDf-Czxz.js → DiffuseBlur-BZxj-iAt.js} +2 -2
- package/dist/core/{DisplacementMap-B_jf_2lj.js → DisplacementMap-31H7QPQl.js} +2 -2
- package/dist/core/{Dither-D3P6EJU8.js → Dither-BN-zSZ0l.js} +2 -2
- package/dist/core/{DotGrid-BnSVhJlh.js → DotGrid-BRDFAkBz.js} +3 -3
- package/dist/core/{DropShadow-BSKVH3n3.js → DropShadow-_lFvglPh.js} +2 -2
- package/dist/core/{Duotone-DfjYuK2u.js → Duotone-BhxXqh0S.js} +2 -2
- package/dist/core/{Ellipse-D7_1QKaa.js → Ellipse-NdZQjjl7.js} +3 -3
- package/dist/core/{Emboss-ZiPslqzl.js → Emboss--yOZdnyf.js} +5 -5
- package/dist/core/{Engraving-DsfkKajz.js → Engraving-B26NgnCE.js} +3 -3
- package/dist/core/{ErosionNoise-SELArv9H.js → ErosionNoise-_uC5Hx2q.js} +4 -4
- package/dist/core/{Exposure-A7WlTOti.js → Exposure-BM3eE3ol.js} +1 -1
- package/dist/core/{FallingLines-9PRMb_Ou.js → FallingLines-BuczyepF.js} +3 -3
- package/dist/core/{FilmGrain-SXzVDesw.js → FilmGrain-Dyy76ena.js} +1 -1
- package/dist/core/{FilmStock-RK4fk4m0.js → FilmStock-mi-H3Ul9.js} +3 -3
- package/dist/core/{Flip-DjoNWG4v.js → Flip-rZzkYscj.js} +2 -2
- package/dist/core/{FloatingParticles-D7vUF5g7.js → FloatingParticles-BbbTJldX.js} +5 -5
- package/dist/core/{FlowField-tHrXhd1b.js → FlowField-u0qYoqV2.js} +4 -4
- package/dist/core/{Flower-BfehbmmG.js → Flower--rN6c2HY.js} +3 -3
- package/dist/core/{FlowingGradient-BTKjkx5F.js → FlowingGradient-_zyM9KQn.js} +98 -13
- package/dist/core/{FlutedGlass-uFT7iy_9.js → FlutedGlass-C9-K6UQ7.js} +3 -3
- package/dist/core/{Fog-Cu1CMATa.js → Fog-2iNe3zZl.js} +3 -3
- package/dist/core/{Form3D-D0ji-MeC.js → Form3D-Dmvpcqp1.js} +3 -3
- package/dist/core/{FractalNoise-D9HYiOdr.js → FractalNoise-C8uudMNt.js} +5 -5
- package/dist/core/{Frost-DQZZxdTk.js → Frost-DV2zJSAL.js} +7 -7
- package/dist/core/{GaborNoise-D7BP0K4g.js → GaborNoise-Bty1hWmn.js} +5 -5
- package/dist/core/{Glass-CzCVnGn-.js → Glass-CYmFGP1b.js} +6 -6
- package/dist/core/{GlassTiles-DJzPPqwz.js → GlassTiles-B3vyGos-.js} +1 -1
- package/dist/core/{Glitch-D1Dx8__X.js → Glitch-DcjdwJep.js} +1 -1
- package/dist/core/{Glow-Bd9_o_Kv.js → Glow-D_nSsYo1.js} +3 -3
- package/dist/core/{Godrays-DRPRWGPm.js → Godrays-lPn_O_W-.js} +3 -3
- package/dist/core/{Goo-28A_pNBg.js → Goo-DxEB8kMF.js} +6 -6
- package/dist/core/{GradientMap-D8dv-1AX.js → GradientMap-7G6EOwy8.js} +2 -2
- package/dist/core/{Grayscale-BlVXBVwW.js → Grayscale-BJz0olll.js} +1 -1
- package/dist/core/{Grid-D9vlHvs1.js → Grid-D8ewrixy.js} +2 -2
- package/dist/core/{GridDistortion-BpqDvqj6.js → GridDistortion-CSBRousF.js} +3 -3
- package/dist/core/{Group-bwQnJRec.js → Group-BSg6a8Ro.js} +1 -1
- package/dist/core/{HTMLInCanvas-gCf64ozE.js → HTMLInCanvas-DnQ0ZY38.js} +1 -1
- package/dist/core/{Halftone-B_WouxiP.js → Halftone-B2C55h6_.js} +2 -2
- package/dist/core/{Heart-Bmt2TLNz.js → Heart-0eDZ50ZK.js} +3 -3
- package/dist/core/{Heatmap-Ruef741_.js → Heatmap-BdExXQBU.js} +7 -7
- package/dist/core/{HexGrid-By9k0YuI.js → HexGrid-B6UygS6q.js} +2 -2
- package/dist/core/{Hologram-Cf25ONOE.js → Hologram-D_eqqb8P.js} +7 -7
- package/dist/core/{Holographic-C9RzYykt.js → Holographic-Ctrsya3k.js} +7 -7
- package/dist/core/{HueShift-V3gQVuIo.js → HueShift-CFXxhPpm.js} +1 -1
- package/dist/core/{ImageTexture-DAUR2N5Q.js → ImageTexture-B5oPuXeI.js} +3 -3
- package/dist/core/{InkFlow-DlP1gmr4.js → InkFlow-C7l_qlaJ.js} +3 -3
- package/dist/core/{Invert-K648khvD.js → Invert-Bya7lBpK.js} +1 -1
- package/dist/core/{IrisWipe-Clkd_5CA.js → IrisWipe-Dg9iiTjF.js} +2 -2
- package/dist/core/{IsometricCubes-CzfAwpQ5.js → IsometricCubes-CC-l8cnR.js} +2 -2
- package/dist/core/{Kaleidoscope-B9k6HkNn.js → Kaleidoscope-DhvQTJdp.js} +2 -2
- package/dist/core/{KeyFrames-DX6JFhsy.js → KeyFrames-ZTsc7rtN.js} +3 -3
- package/dist/core/{LensDistortion-DG4VHEXV.js → LensDistortion-KiZJXFKC.js} +2 -2
- package/dist/core/{LensFlare-DO5lm--6.js → LensFlare-D5fr8RPA.js} +3 -3
- package/dist/core/{LightEdge-CxWsQwpZ.js → LightEdge-D0NOWDh7.js} +7 -7
- package/dist/core/{LightLeak-tGJW6l2_.js → LightLeak-DdaidQ1D.js} +4 -4
- package/dist/core/Line-B5DIIWBz.js +1428 -0
- package/dist/core/{LinearBlur-OmZcUden.js → LinearBlur-CyQxSLS2.js} +2 -2
- package/dist/core/{LinearGradient-DDqFujWC.js → LinearGradient-B8tyawJy.js} +3 -3
- package/dist/core/{LinearWipe-BzthBFNb.js → LinearWipe-D5UkI1cK.js} +2 -2
- package/dist/core/{LiquidMetal-DpRAJ5Ne.js → LiquidMetal-vARkyRL2.js} +230 -41
- package/dist/core/{Liquify-BVzmuY6D.js → Liquify-Djnk6ryT.js} +3 -3
- package/dist/core/{MagneticFilings-BP1KyU2C.js → MagneticFilings-BfTe8-Jn.js} +5 -5
- package/dist/core/{Marble-abj97ioG.js → Marble-3s7VS-tT.js} +4 -4
- package/dist/core/{Mirror-BYqbXWUj.js → Mirror-Ck4Hzdd8.js} +2 -2
- package/dist/core/{MultiPointGradient-DZZSkiDv.js → MultiPointGradient-CdzqMTN9.js} +2 -2
- package/dist/core/{Neon-DD8qY6H9.js → Neon-B8iSfL5s.js} +5 -5
- package/dist/core/{NoiseDissolve-DSkh5NdD.js → NoiseDissolve-Df70NgHI.js} +3 -3
- package/dist/core/{ObjectTracker-DvQF31-0.js → ObjectTracker-CFpotAyg.js} +3 -3
- package/dist/core/{PagePeel-DWtgqWdt.js → PagePeel-Bmc4hBhO.js} +1 -1
- package/dist/core/{Paper-DGzZsv79.js → Paper-af7JgKOt.js} +2 -2
- package/dist/core/{Parallelogram-Ce0Pg7DX.js → Parallelogram-D7bW1gMV.js} +3 -3
- package/dist/core/{ParticleField-CgCOigET.js → ParticleField-FPUBkJmo.js} +4 -4
- package/dist/core/{ParticleFlow-CRQhvYQx.js → ParticleFlow-DfdDvN-j.js} +5 -5
- package/dist/core/{Particles-fKk9qTkl.js → Particles-DZaTzOZP.js} +7 -7
- package/dist/core/{PerlinNoise-DIFK1BpN.js → PerlinNoise-DPaPG55C.js} +5 -5
- package/dist/core/{Perspective-CDNz_7y5.js → Perspective-DBzb7DC9.js} +2 -2
- package/dist/core/{PixelSort-sgh5ghCc.js → PixelSort-sqoLBmqR.js} +2 -2
- package/dist/core/{PixelThrow-CXtB4Am2.js → PixelThrow-arRYRlCO.js} +2 -2
- package/dist/core/{Pixelate-BSOzwVHo.js → Pixelate-Ba_iNPwv.js} +1 -1
- package/dist/core/{Plasma-G6Hl__3L.js → Plasma-zC1y0At6.js} +4 -4
- package/dist/core/{Plastic-B6F2WeaX.js → Plastic-C-NBXCG-.js} +7 -7
- package/dist/core/{PolarCoordinates-Bi99omfI.js → PolarCoordinates-CjV_EFpN.js} +2 -2
- package/dist/core/{Polygon-BFxoe-Fg.js → Polygon-0kVtkdec.js} +3 -3
- package/dist/core/{Posterize-DxiCXLUL.js → Posterize-BUt2MAqY.js} +1 -1
- package/dist/core/{Prism-D6J-acZf.js → Prism-BBSdqnRm.js} +3 -3
- package/dist/core/{ProgressiveBlur-Bko6UMxQ.js → ProgressiveBlur-CQhyaOwl.js} +4 -4
- package/dist/core/{RadialGradient-B_Dgxs9_.js → RadialGradient-BXLBHnCC.js} +3 -3
- package/dist/core/{RadialWipe-U9n5aeiJ.js → RadialWipe-DfJ3dL7p.js} +2 -2
- package/dist/core/{RandomBars-U_zpGDJh.js → RandomBars-B-EaAz9c.js} +3 -3
- package/dist/core/{ReactionDiffusion-I9xj-iK_.js → ReactionDiffusion-r1qHYWoB.js} +3 -3
- package/dist/core/{RectangularCoordinates-DX6wutjX.js → RectangularCoordinates-CFGiELUv.js} +2 -2
- package/dist/core/{ReflectivePlane-DU9pf-7H.js → ReflectivePlane-BbKUjtUs.js} +4 -4
- package/dist/core/{Repeater-kCIaHHFy.js → Repeater-DZhhgwMr.js} +2 -2
- package/dist/core/{Ring-B_tYq3KV.js → Ring-DFxV0XzX.js} +3 -3
- package/dist/core/{RippleWipe-DCgZZ4VT.js → RippleWipe-DFh-8SmT.js} +2 -2
- package/dist/core/{Ripples-BDhMh7XC.js → Ripples-BG24IcNH.js} +3 -3
- package/dist/core/{RoundedRect-9b3REf2d.js → RoundedRect-B2EDoIqT.js} +3 -3
- package/dist/core/{Saturation-CcblT031.js → Saturation-DKbtxVNf.js} +1 -1
- package/dist/core/{Scratches-Rzk27V6D.js → Scratches-C40D6A1_.js} +5 -5
- package/dist/core/{Sharpness-ClLOnNR8.js → Sharpness-DygCiVsY.js} +1 -1
- package/dist/core/{Shatter-CLI896c7.js → Shatter-eVP3Mt9W.js} +3 -3
- package/dist/core/{SimplexNoise-98RPhPzU.js → SimplexNoise-HorjLzId.js} +5 -5
- package/dist/core/{SineWave-BZPrTdYD.js → SineWave-CTIhqhO-.js} +3 -3
- package/dist/core/{SliceWipe-BR5Qr38C.js → SliceWipe-D3yX3CAm.js} +1 -1
- package/dist/core/{Smoke-DoW6Brlo.js → Smoke-CFr-A3JD.js} +4 -4
- package/dist/core/{SmokeFill-CXHhKX8u.js → SmokeFill-DglhxF4x.js} +6 -6
- package/dist/core/{SmokeFlow-mRJ_JcnZ.js → SmokeFlow-CC1tfLRh.js} +4 -4
- package/dist/core/{Solarize-BNCG4TCa.js → Solarize-wvgIpPSb.js} +1 -1
- package/dist/core/{SolidColor-dYxjV0YF.js → SolidColor-CQ9bQ-k6.js} +1 -1
- package/dist/core/{Spherize-6d5WZIZV.js → Spherize-N33ACzeM.js} +2 -2
- package/dist/core/{Spiral-IOZ-Zm0_.js → Spiral-NeLWfZ6k.js} +3 -3
- package/dist/core/{Star-D9txpy4P.js → Star-DqkPHXlP.js} +3 -3
- package/dist/core/{Stone-H2qLOvGJ.js → Stone-mVzuC5SK.js} +2 -2
- package/dist/core/{Strands-Db6_uJAi.js → Strands-C19HsqO_.js} +3 -3
- package/dist/core/{Stretch-BIFeD7-1.js → Stretch-CAGlZjVf.js} +2 -2
- package/dist/core/{Stripes-5YZhE4bc.js → Stripes-DH9wZV3F.js} +3 -3
- package/dist/core/{StudioBackground-B16ICQTt.js → StudioBackground-DPsj_N10.js} +352 -403
- package/dist/core/{SunBurst-DSUFLqjC.js → SunBurst-D5p0QAnh.js} +3 -3
- package/dist/core/{Surface3D-BoliMAeJ.js → Surface3D-HSAAGomd.js} +4 -4
- package/dist/core/{Swirl-CozBN2cj.js → Swirl-C1lH2gAk.js} +3 -3
- package/dist/core/{Teardrop-D8uqqHu8.js → Teardrop-b8XQR6NO.js} +3 -3
- package/dist/core/{Text-Dka9dwCa.js → Text-DPjLa6Eh.js} +3 -3
- package/dist/core/{ThinFilm-d7IlUY62.js → ThinFilm-DhpK-SoR.js} +5 -5
- package/dist/core/{TiltShift-CNc1M7bT.js → TiltShift-e57KIilk.js} +4 -4
- package/dist/core/{TimeTrail-BFuqrI-l.js → TimeTrail-CYofyeeE.js} +3 -3
- package/dist/core/{Tint-BzCm1m93.js → Tint-DBM82OkZ.js} +2 -2
- package/dist/core/{Trapezoid-Dc6dpnCU.js → Trapezoid-DaIBhsop.js} +3 -3
- package/dist/core/{TriangularGrid-BMemTQ8X.js → TriangularGrid-CBOVJOcR.js} +3 -3
- package/dist/core/{Tritone-XnyfjYXL.js → Tritone-D6Dur2eo.js} +2 -2
- package/dist/core/{Truchet-DUbAZPvr.js → Truchet-sunCQd_E.js} +2 -2
- package/dist/core/{Twirl-Dj6ZOh7V.js → Twirl-D3-3HSuS.js} +2 -2
- package/dist/core/{VHS-DcN38Sa-.js → VHS-DtyeGxi8.js} +1 -1
- package/dist/core/{VenetianBlinds-Dsix9S6Y.js → VenetianBlinds-H8OVGxhT.js} +2 -2
- package/dist/core/{Vesica-BvLPrNBY.js → Vesica-C8MrL_up.js} +3 -3
- package/dist/core/{Vibrance-B3F1IOJC.js → Vibrance-B8gBhQS7.js} +1 -1
- package/dist/core/{VideoTexture-rZnbkY1j.js → VideoTexture--U8aiyP1.js} +2 -2
- package/dist/core/{Vignette-D747S9Un.js → Vignette-yIXlpfCE.js} +2 -2
- package/dist/core/{Voronoi-tdjJp1Yz.js → Voronoi-BW4RE3MQ.js} +3 -3
- package/dist/core/{Water-wnYFmeVF.js → Water-uLbQQrt-.js} +7 -7
- package/dist/core/{Watercolor-DlrWTnkX.js → Watercolor-CcZ0fVEu.js} +3 -3
- package/dist/core/{WaveDistortion-11QwOfVR.js → WaveDistortion-DasSsVxv.js} +3 -3
- package/dist/core/{WaveletNoise-DWOzHG3M.js → WaveletNoise-DpRWc5Qw.js} +5 -5
- package/dist/core/{Weave-CdGwj7cZ.js → Weave-CLGYIcmf.js} +2 -2
- package/dist/core/{WebcamTexture-CihYSbzd.js → WebcamTexture--GTVU-Bm.js} +3 -3
- package/dist/core/{Wool-DKCBMabi.js → Wool-uy61uieK.js} +2 -2
- package/dist/core/{WorleyNoise-BjD32UOl.js → WorleyNoise-i7i0azT8.js} +3 -3
- package/dist/core/{ZoomBlur-BnRTijPn.js → ZoomBlur-OQP2jw3F.js} +2 -2
- package/dist/core/{agents-c-JjGH1b.js → agents-BVhq_Z2T.js} +1 -1
- package/dist/core/bevel-BGAb1fb2.js +121 -0
- package/dist/core/{blur-DKmdsW6d.js → blur-cLcFzL4x.js} +3 -3
- package/dist/core/{compute-BoeIXi0l.js → compute-Ax-p6Ubc.js} +1 -1
- package/dist/core/{edges-BZUKQxSE.js → edges-B7Yet3LV.js} +10 -10
- package/dist/core/{glass-BVqgjSPg.js → glass-CNFJB2On.js} +8 -8
- package/dist/core/gpu/composer.d.ts +1 -0
- package/dist/core/gpu/composer.d.ts.map +1 -1
- package/dist/core/gpu/kit/blur.d.ts +7 -7
- package/dist/core/gpu/kit/blur.d.ts.map +1 -1
- package/dist/core/gpu/kit/effects/bevel.d.ts +5 -0
- package/dist/core/gpu/kit/effects/bevel.d.ts.map +1 -0
- package/dist/core/gpu/kit/effects/glass.d.ts.map +1 -1
- package/dist/core/gpu/kit/effects/index.d.ts +1 -0
- package/dist/core/gpu/kit/effects/index.d.ts.map +1 -1
- package/dist/core/gpu/porters.d.ts +1 -1
- package/dist/core/gpu/porters.d.ts.map +1 -1
- package/dist/core/index.js +210 -207
- package/dist/core/{media-Ds6MRfGR.js → media-Y-WxQcQD.js} +1 -1
- package/dist/core/{noise-Cq0KUOSC.js → noise-B-PI7JUx.js} +1 -1
- package/dist/core/{noiseColor-CQyzqpVZ.js → noiseColor-BQAO-Rjk.js} +2 -2
- package/dist/core/{noiseColor-DjCUZ_8u.js → noiseColor-Cgx-FS2o.js} +2 -2
- package/dist/core/{noiseStylize-fKVcJbGK.js → noiseStylize-BN5zji1E.js} +2 -2
- package/dist/core/{porters-DogLzpKT.js → porters-D_xmIPz2.js} +2 -2
- package/dist/core/registry.js +210 -207
- package/dist/core/{sdf-o99ONcMJ.js → sdf-B8rPE1PG.js} +1 -1
- package/dist/core/shaderRegistry-DFRVhoj2.js +431 -0
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +5 -5
- package/dist/core/shaders/Arc/index.js +6 -6
- package/dist/core/shaders/Ascii/index.js +5 -5
- package/dist/core/shaders/Aurora/index.js +6 -6
- package/dist/core/shaders/BarShift/index.js +5 -5
- package/dist/core/shaders/BarnDoors/index.js +5 -5
- package/dist/core/shaders/Beam/index.js +5 -5
- package/dist/core/shaders/Bend/index.js +5 -5
- package/dist/core/shaders/Blob/index.js +5 -5
- package/dist/core/shaders/BlockDissolve/index.js +6 -6
- package/dist/core/shaders/BlockNoise/index.js +8 -8
- package/dist/core/shaders/BlueNoise/index.js +8 -8
- package/dist/core/shaders/Blur/index.js +6 -6
- package/dist/core/shaders/Boids/index.js +7 -7
- package/dist/core/shaders/BokehBlur/index.js +6 -6
- package/dist/core/shaders/BrickPattern/index.js +5 -5
- package/dist/core/shaders/BrightnessContrast/index.js +5 -5
- package/dist/core/shaders/BrushedMetal/index.d.ts +13 -1
- package/dist/core/shaders/BrushedMetal/index.d.ts.map +1 -1
- package/dist/core/shaders/BrushedMetal/index.js +10 -9
- package/dist/core/shaders/Bulge/index.js +5 -5
- package/dist/core/shaders/CRTScreen/index.js +5 -5
- package/dist/core/shaders/CarbonFiber/index.d.ts +13 -1
- package/dist/core/shaders/CarbonFiber/index.d.ts.map +1 -1
- package/dist/core/shaders/CarbonFiber/index.js +10 -9
- package/dist/core/shaders/Chalkboard/index.js +5 -5
- package/dist/core/shaders/ChannelBlur/index.js +6 -6
- package/dist/core/shaders/CheckerWipe/index.js +5 -5
- package/dist/core/shaders/Checkerboard/index.js +5 -5
- package/dist/core/shaders/Chevron/index.js +5 -5
- package/dist/core/shaders/ChromaFlow/index.js +5 -5
- package/dist/core/shaders/ChromaticAberration/index.js +5 -5
- package/dist/core/shaders/Chrome/index.d.ts +152 -0
- package/dist/core/shaders/Chrome/index.d.ts.map +1 -0
- package/dist/core/shaders/Chrome/index.js +14 -0
- package/dist/core/shaders/Circle/index.js +6 -6
- package/dist/core/shaders/ColorWheel/index.js +5 -5
- package/dist/core/shaders/CompressionArtifacts/index.js +5 -5
- package/dist/core/shaders/ConcentricSpin/index.js +5 -5
- package/dist/core/shaders/ConicGradient/index.js +5 -5
- package/dist/core/shaders/ContourLines/index.js +5 -5
- package/dist/core/shaders/CornerPin/index.js +5 -5
- package/dist/core/shaders/Crescent/index.js +6 -6
- package/dist/core/shaders/Cross/index.js +6 -6
- package/dist/core/shaders/Crystal/index.js +9 -9
- package/dist/core/shaders/CurlNoise/index.js +8 -8
- package/dist/core/shaders/CursorRipples/index.js +5 -5
- package/dist/core/shaders/CursorTrail/index.js +5 -5
- package/dist/core/shaders/DataMosh/index.js +5 -5
- package/dist/core/shaders/DiamondGradient/index.js +5 -5
- package/dist/core/shaders/DiamondWipe/index.js +5 -5
- package/dist/core/shaders/DiffuseBlur/index.js +5 -5
- package/dist/core/shaders/DisplacementMap/index.js +5 -5
- package/dist/core/shaders/Dither/index.js +5 -5
- package/dist/core/shaders/DotGrid/index.js +5 -5
- package/dist/core/shaders/DropShadow/index.js +5 -5
- package/dist/core/shaders/Duotone/index.js +5 -5
- package/dist/core/shaders/Ellipse/index.js +6 -6
- package/dist/core/shaders/Emboss/index.js +8 -8
- package/dist/core/shaders/Engraving/index.js +6 -6
- package/dist/core/shaders/ErosionNoise/index.js +8 -8
- package/dist/core/shaders/Exposure/index.js +5 -5
- package/dist/core/shaders/FallingLines/index.js +5 -5
- package/dist/core/shaders/FilmGrain/index.js +5 -5
- package/dist/core/shaders/FilmStock/index.js +6 -6
- package/dist/core/shaders/Flip/index.js +5 -5
- package/dist/core/shaders/FloatingParticles/index.js +7 -7
- package/dist/core/shaders/FlowField/index.js +6 -6
- package/dist/core/shaders/Flower/index.js +6 -6
- package/dist/core/shaders/FlowingGradient/index.d.ts.map +1 -1
- package/dist/core/shaders/FlowingGradient/index.js +6 -6
- package/dist/core/shaders/FlutedGlass/index.js +5 -5
- package/dist/core/shaders/Fog/index.js +5 -5
- package/dist/core/shaders/Form3D/index.js +5 -5
- package/dist/core/shaders/FractalNoise/index.js +7 -7
- package/dist/core/shaders/Frost/index.js +9 -9
- package/dist/core/shaders/GaborNoise/index.js +8 -8
- package/dist/core/shaders/Glass/index.js +9 -9
- package/dist/core/shaders/GlassTiles/index.js +5 -5
- package/dist/core/shaders/Glitch/index.js +5 -5
- package/dist/core/shaders/Glow/index.js +6 -6
- package/dist/core/shaders/Godrays/index.js +5 -5
- package/dist/core/shaders/Goo/index.js +8 -8
- package/dist/core/shaders/GradientMap/index.js +5 -5
- package/dist/core/shaders/Grayscale/index.js +5 -5
- package/dist/core/shaders/Grid/index.js +5 -5
- package/dist/core/shaders/GridDistortion/index.js +5 -5
- package/dist/core/shaders/Group/index.js +5 -5
- package/dist/core/shaders/HTMLInCanvas/index.js +5 -5
- package/dist/core/shaders/Halftone/index.js +5 -5
- package/dist/core/shaders/Heart/index.js +6 -6
- package/dist/core/shaders/Heatmap/index.js +9 -9
- package/dist/core/shaders/HexGrid/index.js +5 -5
- package/dist/core/shaders/Hologram/index.js +9 -9
- package/dist/core/shaders/Holographic/index.js +9 -9
- package/dist/core/shaders/HueShift/index.js +5 -5
- package/dist/core/shaders/ImageTexture/index.js +7 -7
- package/dist/core/shaders/InkFlow/index.js +5 -5
- package/dist/core/shaders/Invert/index.js +5 -5
- package/dist/core/shaders/IrisWipe/index.js +5 -5
- package/dist/core/shaders/IsometricCubes/index.js +5 -5
- package/dist/core/shaders/Kaleidoscope/index.js +5 -5
- package/dist/core/shaders/KeyFrames/index.js +5 -5
- package/dist/core/shaders/LensDistortion/index.js +5 -5
- package/dist/core/shaders/LensFlare/index.js +5 -5
- package/dist/core/shaders/LightEdge/index.js +9 -9
- package/dist/core/shaders/LightLeak/index.js +6 -6
- package/dist/core/shaders/Line/index.d.ts +72 -0
- package/dist/core/shaders/Line/index.d.ts.map +1 -0
- package/dist/core/shaders/Line/index.js +7 -0
- package/dist/core/shaders/LinearBlur/index.js +5 -5
- package/dist/core/shaders/LinearGradient/index.js +5 -5
- package/dist/core/shaders/LinearWipe/index.js +5 -5
- package/dist/core/shaders/LiquidMetal/index.d.ts +13 -1
- package/dist/core/shaders/LiquidMetal/index.d.ts.map +1 -1
- package/dist/core/shaders/LiquidMetal/index.js +10 -9
- package/dist/core/shaders/Liquify/index.js +5 -5
- package/dist/core/shaders/MagneticFilings/index.js +7 -7
- package/dist/core/shaders/Marble/index.js +6 -6
- package/dist/core/shaders/Mirror/index.js +5 -5
- package/dist/core/shaders/MultiPointGradient/index.js +5 -5
- package/dist/core/shaders/Neon/index.js +7 -7
- package/dist/core/shaders/NoiseDissolve/index.js +6 -6
- package/dist/core/shaders/ObjectTracker/index.js +6 -6
- package/dist/core/shaders/PagePeel/index.js +5 -5
- package/dist/core/shaders/Paper/index.js +6 -6
- package/dist/core/shaders/Parallelogram/index.js +6 -6
- package/dist/core/shaders/ParticleField/index.js +7 -7
- package/dist/core/shaders/ParticleFlow/index.js +7 -7
- package/dist/core/shaders/Particles/index.js +9 -9
- package/dist/core/shaders/PerlinNoise/index.js +8 -8
- package/dist/core/shaders/Perspective/index.js +5 -5
- package/dist/core/shaders/PixelSort/index.js +5 -5
- package/dist/core/shaders/PixelThrow/index.js +5 -5
- package/dist/core/shaders/Pixelate/index.js +5 -5
- package/dist/core/shaders/Plasma/index.js +6 -6
- package/dist/core/shaders/Plastic/index.js +9 -9
- package/dist/core/shaders/PolarCoordinates/index.js +5 -5
- package/dist/core/shaders/Polygon/index.js +6 -6
- package/dist/core/shaders/Posterize/index.js +5 -5
- package/dist/core/shaders/Prism/index.js +5 -5
- package/dist/core/shaders/ProgressiveBlur/index.js +6 -6
- package/dist/core/shaders/RadialGradient/index.js +5 -5
- package/dist/core/shaders/RadialWipe/index.js +5 -5
- package/dist/core/shaders/RandomBars/index.js +6 -6
- package/dist/core/shaders/ReactionDiffusion/index.js +5 -5
- package/dist/core/shaders/RectangularCoordinates/index.js +5 -5
- package/dist/core/shaders/ReflectivePlane/index.js +6 -6
- package/dist/core/shaders/Repeater/index.js +5 -5
- package/dist/core/shaders/Ring/index.js +6 -6
- package/dist/core/shaders/RippleWipe/index.js +5 -5
- package/dist/core/shaders/Ripples/index.js +5 -5
- package/dist/core/shaders/RoundedRect/index.js +6 -6
- package/dist/core/shaders/Saturation/index.js +5 -5
- package/dist/core/shaders/Scratches/index.js +8 -8
- package/dist/core/shaders/Sharpness/index.js +5 -5
- package/dist/core/shaders/Shatter/index.js +5 -5
- package/dist/core/shaders/SimplexNoise/index.js +7 -7
- package/dist/core/shaders/SineWave/index.js +5 -5
- package/dist/core/shaders/SliceWipe/index.js +5 -5
- package/dist/core/shaders/Smoke/index.js +5 -5
- package/dist/core/shaders/SmokeFill/index.js +8 -8
- package/dist/core/shaders/SmokeFlow/index.js +5 -5
- package/dist/core/shaders/Solarize/index.js +5 -5
- package/dist/core/shaders/SolidColor/index.js +2 -2
- package/dist/core/shaders/Spherize/index.js +5 -5
- package/dist/core/shaders/Spiral/index.js +5 -5
- package/dist/core/shaders/Star/index.js +6 -6
- package/dist/core/shaders/Stone/index.js +4 -4
- package/dist/core/shaders/Strands/index.js +5 -5
- package/dist/core/shaders/Stretch/index.js +5 -5
- package/dist/core/shaders/Stripes/index.js +5 -5
- package/dist/core/shaders/StudioBackground/index.d.ts +1 -1
- package/dist/core/shaders/StudioBackground/index.d.ts.map +1 -1
- package/dist/core/shaders/StudioBackground/index.js +5 -5
- package/dist/core/shaders/SunBurst/index.js +5 -5
- package/dist/core/shaders/Surface3D/index.js +6 -6
- package/dist/core/shaders/Swirl/index.js +5 -5
- package/dist/core/shaders/Teardrop/index.js +6 -6
- package/dist/core/shaders/Text/index.js +6 -6
- package/dist/core/shaders/ThinFilm/index.js +7 -7
- package/dist/core/shaders/TiltShift/index.js +6 -6
- package/dist/core/shaders/TimeTrail/index.js +5 -5
- package/dist/core/shaders/Tint/index.js +5 -5
- package/dist/core/shaders/Trapezoid/index.js +6 -6
- package/dist/core/shaders/TriangularGrid/index.js +5 -5
- package/dist/core/shaders/Tritone/index.js +5 -5
- package/dist/core/shaders/Truchet/index.js +5 -5
- package/dist/core/shaders/Twirl/index.js +5 -5
- package/dist/core/shaders/VHS/index.js +5 -5
- package/dist/core/shaders/VenetianBlinds/index.js +5 -5
- package/dist/core/shaders/Vesica/index.js +6 -6
- package/dist/core/shaders/Vibrance/index.js +5 -5
- package/dist/core/shaders/VideoTexture/index.js +6 -6
- package/dist/core/shaders/Vignette/index.js +5 -5
- package/dist/core/shaders/Voronoi/index.js +5 -5
- package/dist/core/shaders/Water/index.js +9 -9
- package/dist/core/shaders/Watercolor/index.js +6 -6
- package/dist/core/shaders/WaveDistortion/index.js +5 -5
- package/dist/core/shaders/WaveletNoise/index.js +8 -8
- package/dist/core/shaders/Weave/index.js +5 -5
- package/dist/core/shaders/WebcamTexture/index.js +7 -7
- package/dist/core/shaders/Wool/index.js +4 -4
- package/dist/core/shaders/WorleyNoise/index.js +5 -5
- package/dist/core/shaders/ZoomBlur/index.js +5 -5
- package/dist/core/{shapeEffectBounds-Dg4GQ5vW.js → shapeEffectBounds-Svfd_R5a.js} +13 -9
- package/dist/core/utilities/shapeEffectBounds.d.ts.map +1 -1
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +166 -166
- package/dist/js/createShader.js +1 -1
- package/dist/js/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/js/utils/generatePresetCode.js +54 -0
- package/dist/react/Chrome.js +226 -0
- package/dist/react/Line.js +226 -0
- package/dist/react/Preview.js +2 -0
- package/dist/react/Shader.js +1 -1
- package/dist/react/bundle.js +153 -153
- package/dist/react/components/BrushedMetal.d.ts +3 -1
- package/dist/react/components/BrushedMetal.d.ts.map +1 -1
- package/dist/react/components/CarbonFiber.d.ts +3 -1
- package/dist/react/components/CarbonFiber.d.ts.map +1 -1
- package/dist/react/components/Chrome.d.ts +46 -0
- package/dist/react/components/Chrome.d.ts.map +1 -0
- package/dist/react/components/Line.d.ts +40 -0
- package/dist/react/components/Line.d.ts.map +1 -0
- package/dist/react/components/LiquidMetal.d.ts +3 -1
- package/dist/react/components/LiquidMetal.d.ts.map +1 -1
- package/dist/react/engine/Preview.d.ts.map +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +3 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +54 -0
- package/dist/registry.js +1179 -2
- package/dist/solid/components/BrushedMetal.d.ts +3 -1
- package/dist/solid/components/BrushedMetal.d.ts.map +1 -1
- package/dist/solid/components/CarbonFiber.d.ts +3 -1
- package/dist/solid/components/CarbonFiber.d.ts.map +1 -1
- package/dist/solid/components/Chrome.d.ts +43 -0
- package/dist/solid/components/Chrome.d.ts.map +1 -0
- package/dist/solid/components/Chrome.js +232 -0
- package/dist/solid/components/Line.d.ts +37 -0
- package/dist/solid/components/Line.d.ts.map +1 -0
- package/dist/solid/components/Line.js +232 -0
- package/dist/solid/components/LiquidMetal.d.ts +3 -1
- package/dist/solid/components/LiquidMetal.d.ts.map +1 -1
- package/dist/solid/engine/Preview.d.ts.map +1 -1
- package/dist/solid/engine/Preview.js +203 -199
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/solid/index.d.ts +2 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +333 -329
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +54 -0
- package/dist/svelte/components/BrushedMetal.svelte.d.ts +2 -0
- package/dist/svelte/components/CarbonFiber.svelte.d.ts +2 -0
- package/dist/svelte/components/Chrome.svelte.d.ts +33 -0
- package/dist/svelte/components/Line.svelte.d.ts +27 -0
- package/dist/svelte/components/LiquidMetal.svelte.d.ts +2 -0
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.js +2313 -1899
- package/dist/svelte/source/components/BrushedMetal.svelte +2 -0
- package/dist/svelte/source/components/CarbonFiber.svelte +2 -0
- package/dist/svelte/source/components/Chrome.svelte +357 -0
- package/dist/svelte/source/components/Line.svelte +351 -0
- package/dist/svelte/source/components/LiquidMetal.svelte +2 -0
- package/dist/svelte/source/engine/Preview.svelte +4 -0
- package/dist/svelte/source/index.js +2 -0
- package/dist/svelte/utils/generatePresetCode.js +54 -0
- package/dist/vue/BrushedMetal.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/CarbonFiber.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/Chrome.js +3 -0
- package/dist/vue/Chrome.vue_vue_type_script_setup_true_lang.js +247 -0
- package/dist/vue/Line.js +3 -0
- package/dist/vue/Line.vue_vue_type_script_setup_true_lang.js +234 -0
- package/dist/vue/LiquidMetal.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/vue/components/BrushedMetal.vue.d.ts +2 -0
- package/dist/vue/components/BrushedMetal.vue.d.ts.map +1 -1
- package/dist/vue/components/CarbonFiber.vue.d.ts +2 -0
- package/dist/vue/components/CarbonFiber.vue.d.ts.map +1 -1
- package/dist/vue/components/Chrome.vue.d.ts +68 -0
- package/dist/vue/components/Chrome.vue.d.ts.map +1 -0
- package/dist/vue/components/Line.vue.d.ts +62 -0
- package/dist/vue/components/Line.vue.d.ts.map +1 -0
- package/dist/vue/components/LiquidMetal.vue.d.ts +2 -0
- package/dist/vue/components/LiquidMetal.vue.d.ts.map +1 -1
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +3 -1
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +54 -0
- package/package.json +17 -1
- package/dist/core/shaderRegistry-CkDrffEe.js +0 -427
- /package/dist/core/{fonts-DFuXI3Hk.js → fonts-DxVn9e-I.js} +0 -0
- /package/dist/core/{naturalSize-B679wTgN.js → naturalSize-BPCi_I-Z.js} +0 -0
- /package/dist/core/{transformations-CsPUHppB.js → transformations-C7gn_5rF.js} +0 -0
package/dist/js/createShader.js
CHANGED
|
@@ -184,7 +184,7 @@ async function createShader(canvas, preset, options) {
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
if (renderer.getPerformanceStats().fps > 0) {
|
|
187
|
-
state.telemetryCollector = startTelemetry(renderer, "3.0.
|
|
187
|
+
state.telemetryCollector = startTelemetry(renderer, "3.0.453", options?.disableTelemetry || false, false);
|
|
188
188
|
if (state.telemetryCollector) state.telemetryCollector.start();
|
|
189
189
|
state.telemetryStartTimeout = null;
|
|
190
190
|
} else state.telemetryStartTimeout = setTimeout(checkRendering, 500);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;
|
|
1
|
+
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAw8FD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAwBpM;AAGD,eAAO,MAAM,mBAAmB,UAkM/B,CAAA"}
|
|
@@ -261,6 +261,8 @@ var shaderMetadata = {
|
|
|
261
261
|
"envRotation": 0,
|
|
262
262
|
"lightAngle": 215,
|
|
263
263
|
"speed": .4,
|
|
264
|
+
"bevelWidth": .05,
|
|
265
|
+
"bevelShape": 0,
|
|
264
266
|
"edgeSoftness": .05,
|
|
265
267
|
"shape": "{\"type\":\"circleSDF\",\"radius\":0.35}"
|
|
266
268
|
},
|
|
@@ -298,6 +300,8 @@ var shaderMetadata = {
|
|
|
298
300
|
"environment": 2,
|
|
299
301
|
"envRotation": 0,
|
|
300
302
|
"lightAngle": 215,
|
|
303
|
+
"bevelWidth": .05,
|
|
304
|
+
"bevelShape": 0,
|
|
301
305
|
"edgeSoftness": .05,
|
|
302
306
|
"shape": "{\"type\":\"circleSDF\",\"radius\":0.35}"
|
|
303
307
|
},
|
|
@@ -370,6 +374,33 @@ var shaderMetadata = {
|
|
|
370
374
|
"greenOffset": 0,
|
|
371
375
|
"blueOffset": 1
|
|
372
376
|
},
|
|
377
|
+
"Chrome": {
|
|
378
|
+
"opacity": 1,
|
|
379
|
+
"blendMode": "normal",
|
|
380
|
+
"origin": "center",
|
|
381
|
+
"center": {
|
|
382
|
+
"x": .5,
|
|
383
|
+
"y": .5
|
|
384
|
+
},
|
|
385
|
+
"scale": 1,
|
|
386
|
+
"rotation": 0,
|
|
387
|
+
"tint": "#ffffff",
|
|
388
|
+
"warmColor": "#ffa94d",
|
|
389
|
+
"coolColor": "#82a7e6",
|
|
390
|
+
"bevelWidth": .028,
|
|
391
|
+
"bevelShape": .55,
|
|
392
|
+
"curvature": .5,
|
|
393
|
+
"waviness": .15,
|
|
394
|
+
"environment": 1,
|
|
395
|
+
"envRotation": 0,
|
|
396
|
+
"softness": .3,
|
|
397
|
+
"spectral": .9,
|
|
398
|
+
"dispersion": .3,
|
|
399
|
+
"shadows": .7,
|
|
400
|
+
"speed": .5,
|
|
401
|
+
"edgeSoftness": .05,
|
|
402
|
+
"shape": "{\"type\":\"roundedRectSDF\",\"width\":0.42,\"height\":0.3,\"rounding\":0.12}"
|
|
403
|
+
},
|
|
373
404
|
"Circle": {
|
|
374
405
|
"opacity": 1,
|
|
375
406
|
"blendMode": "normal",
|
|
@@ -1407,6 +1438,25 @@ var shaderMetadata = {
|
|
|
1407
1438
|
"speed": 1,
|
|
1408
1439
|
"seed": 0
|
|
1409
1440
|
},
|
|
1441
|
+
"Line": {
|
|
1442
|
+
"opacity": 1,
|
|
1443
|
+
"blendMode": "normal",
|
|
1444
|
+
"color": "#ffffff",
|
|
1445
|
+
"pointA": {
|
|
1446
|
+
"x": .2,
|
|
1447
|
+
"y": .5
|
|
1448
|
+
},
|
|
1449
|
+
"pointB": {
|
|
1450
|
+
"x": .8,
|
|
1451
|
+
"y": .5
|
|
1452
|
+
},
|
|
1453
|
+
"thickness": .01,
|
|
1454
|
+
"style": "solid",
|
|
1455
|
+
"dashLength": .05,
|
|
1456
|
+
"gapLength": .025,
|
|
1457
|
+
"capStart": "rounded",
|
|
1458
|
+
"capEnd": "rounded"
|
|
1459
|
+
},
|
|
1410
1460
|
"LinearBlur": {
|
|
1411
1461
|
"opacity": 1,
|
|
1412
1462
|
"blendMode": "normal",
|
|
@@ -1460,6 +1510,8 @@ var shaderMetadata = {
|
|
|
1460
1510
|
"sharpness": .6,
|
|
1461
1511
|
"dispersion": .25,
|
|
1462
1512
|
"lightAngle": 265,
|
|
1513
|
+
"bevelWidth": .05,
|
|
1514
|
+
"bevelShape": 0,
|
|
1463
1515
|
"edgeSoftness": .05,
|
|
1464
1516
|
"shape": "{\"type\":\"circleSDF\",\"radius\":0.35}"
|
|
1465
1517
|
},
|
|
@@ -2898,6 +2950,7 @@ const availableComponents = [
|
|
|
2898
2950
|
"Chevron",
|
|
2899
2951
|
"ChromaFlow",
|
|
2900
2952
|
"ChromaticAberration",
|
|
2953
|
+
"Chrome",
|
|
2901
2954
|
"Circle",
|
|
2902
2955
|
"ColorWheel",
|
|
2903
2956
|
"CompressionArtifacts",
|
|
@@ -2969,6 +3022,7 @@ const availableComponents = [
|
|
|
2969
3022
|
"LensFlare",
|
|
2970
3023
|
"LightEdge",
|
|
2971
3024
|
"LightLeak",
|
|
3025
|
+
"Line",
|
|
2972
3026
|
"LinearBlur",
|
|
2973
3027
|
"LinearGradient",
|
|
2974
3028
|
"LinearWipe",
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { ShaderContext } from "./Shader.js";
|
|
2
|
+
import { useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { createGpuUniformsMap, resolveBoundingBox } from "../core/index.js";
|
|
5
|
+
import { setColorSpaceMode } from "../core/utilities/transformations/index.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { componentDefinition } from "../core/shaders/Chrome/index.js";
|
|
8
|
+
function isPropDriver(value) {
|
|
9
|
+
return typeof value === "object" && value !== null && "type" in value && (value.type === "map" || value.type === "mouse" || value.type === "mouse-position" || value.type === "auto-animate");
|
|
10
|
+
}
|
|
11
|
+
function computeEffectiveProps(props, defaultProps$1) {
|
|
12
|
+
let baseProps = { ...defaultProps$1 };
|
|
13
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && value !== void 0 && !isPropDriver(value)) baseProps[key] = value;
|
|
14
|
+
return baseProps;
|
|
15
|
+
}
|
|
16
|
+
var MARKER_STYLE = { display: "contents" };
|
|
17
|
+
var DEFAULT_TRANSFORM = {
|
|
18
|
+
offsetX: 0,
|
|
19
|
+
offsetY: 0,
|
|
20
|
+
rotation: 0,
|
|
21
|
+
scale: 1,
|
|
22
|
+
anchorX: .5,
|
|
23
|
+
anchorY: .5,
|
|
24
|
+
edges: "transparent"
|
|
25
|
+
};
|
|
26
|
+
var defaultProps = {
|
|
27
|
+
blendMode: "normal",
|
|
28
|
+
visible: true
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
if (componentDefinition && componentDefinition.props) Object.entries(componentDefinition.props).forEach(([key, config]) => {
|
|
32
|
+
const propConfig = config;
|
|
33
|
+
if (propConfig && typeof propConfig === "object" && "default" in propConfig) defaultProps[key] = propConfig.default;
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.warn("Error extracting default props:", e);
|
|
37
|
+
}
|
|
38
|
+
const ShaderComponent = (props) => {
|
|
39
|
+
const context = useContext(ShaderContext);
|
|
40
|
+
if (!context) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
41
|
+
const { shaderParentId: parentId, shaderNodeRegister: parentRegister, shaderUniformUpdate: parentUniformUpdate, shaderMetadataUpdate: parentMetadataUpdate, shaderColorSpace } = context;
|
|
42
|
+
const reactId = useId();
|
|
43
|
+
const instanceId = useMemo(() => {
|
|
44
|
+
return (props.id ? props.id.replace(/[^a-zA-Z0-9_]/g, "_") : null) || reactId.replace(/[^a-zA-Z0-9_]/g, "");
|
|
45
|
+
}, [props.id, reactId]);
|
|
46
|
+
const effectiveProps = useMemo(() => {
|
|
47
|
+
return computeEffectiveProps(props, defaultProps);
|
|
48
|
+
}, [props]);
|
|
49
|
+
const effectiveTransform = useMemo(() => ({
|
|
50
|
+
...DEFAULT_TRANSFORM,
|
|
51
|
+
...props.transform
|
|
52
|
+
}), [props.transform]);
|
|
53
|
+
const effectiveBoundingBox = useMemo(() => resolveBoundingBox(props.boundingBox), [props.boundingBox]);
|
|
54
|
+
const markerRef = useRef(null);
|
|
55
|
+
const isCapturesDOM = !!componentDefinition.capturesDOM;
|
|
56
|
+
const captureCanvasRef = useRef(null);
|
|
57
|
+
const [domMounted, setDomMounted] = useState(false);
|
|
58
|
+
const [captureSize, setCaptureSize] = useState(() => ({
|
|
59
|
+
w: typeof window !== "undefined" ? Math.round(window.innerWidth * Math.min(window.devicePixelRatio, 2)) : 0,
|
|
60
|
+
h: typeof window !== "undefined" ? Math.round(window.innerHeight * Math.min(window.devicePixelRatio, 2)) : 0
|
|
61
|
+
}));
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!isCapturesDOM) return;
|
|
64
|
+
setDomMounted(true);
|
|
65
|
+
const onResize = () => {
|
|
66
|
+
const d = Math.min(window.devicePixelRatio, 2);
|
|
67
|
+
setCaptureSize({
|
|
68
|
+
w: Math.round(window.innerWidth * d),
|
|
69
|
+
h: Math.round(window.innerHeight * d)
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
window.addEventListener("resize", onResize);
|
|
73
|
+
return () => window.removeEventListener("resize", onResize);
|
|
74
|
+
}, [isCapturesDOM]);
|
|
75
|
+
const detectedOrderRef = useRef(void 0);
|
|
76
|
+
const uniformsRef = useRef(null);
|
|
77
|
+
if (uniformsRef.current === null) {
|
|
78
|
+
setColorSpaceMode(shaderColorSpace);
|
|
79
|
+
uniformsRef.current = createGpuUniformsMap(componentDefinition, effectiveProps, instanceId);
|
|
80
|
+
}
|
|
81
|
+
const childContextValue = useMemo(() => {
|
|
82
|
+
return {
|
|
83
|
+
...context,
|
|
84
|
+
shaderParentId: instanceId
|
|
85
|
+
};
|
|
86
|
+
}, [context, instanceId]);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!uniformsRef.current) return;
|
|
89
|
+
try {
|
|
90
|
+
const metadata = {
|
|
91
|
+
blendMode: props.blendMode || "normal",
|
|
92
|
+
opacity: props.opacity,
|
|
93
|
+
visible: props.visible === false ? false : true,
|
|
94
|
+
id: props.id,
|
|
95
|
+
mask: props.maskSource ? {
|
|
96
|
+
source: props.maskSource,
|
|
97
|
+
type: props.maskType || "alpha"
|
|
98
|
+
} : void 0,
|
|
99
|
+
maps: mapsFromProps,
|
|
100
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
101
|
+
transform: effectiveTransform,
|
|
102
|
+
boundingBox: effectiveBoundingBox,
|
|
103
|
+
flow: props.flow,
|
|
104
|
+
absolute: props.absolute
|
|
105
|
+
};
|
|
106
|
+
parentRegister(instanceId, componentDefinition.fragment, parentId, metadata, uniformsRef.current, componentDefinition, isCapturesDOM ? captureCanvasRef.current ?? void 0 : void 0);
|
|
107
|
+
return () => {
|
|
108
|
+
parentRegister(instanceId, null, null, null, null);
|
|
109
|
+
};
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error("Error registering shader node:", error);
|
|
112
|
+
return () => {};
|
|
113
|
+
}
|
|
114
|
+
}, [
|
|
115
|
+
instanceId,
|
|
116
|
+
parentId,
|
|
117
|
+
parentRegister,
|
|
118
|
+
domMounted
|
|
119
|
+
]);
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
if (props.renderOrder === void 0 && markerRef.current) {
|
|
122
|
+
const parent = markerRef.current.parentElement;
|
|
123
|
+
if (parent) {
|
|
124
|
+
const siblings = parent.querySelectorAll(":scope > [data-shader-id]");
|
|
125
|
+
const position = Array.from(siblings).indexOf(markerRef.current);
|
|
126
|
+
if (position >= 0) {
|
|
127
|
+
detectedOrderRef.current = position;
|
|
128
|
+
parentMetadataUpdate(instanceId, { renderOrder: position });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, []);
|
|
133
|
+
const prevPropsRef = useRef({});
|
|
134
|
+
const mapsFromProps = useMemo(() => {
|
|
135
|
+
const maps = {};
|
|
136
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && isPropDriver(value)) maps[key] = value;
|
|
137
|
+
return Object.keys(maps).length > 0 ? maps : void 0;
|
|
138
|
+
}, [props]);
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
if (!uniformsRef.current) return;
|
|
141
|
+
try {
|
|
142
|
+
Object.entries(uniformsRef.current).forEach(([propName, uniformData]) => {
|
|
143
|
+
if (!uniformData || typeof uniformData !== "object") return;
|
|
144
|
+
if (uniformData.value !== void 0 && propName in effectiveProps) {
|
|
145
|
+
const newValue = effectiveProps[propName];
|
|
146
|
+
if (isPropDriver(newValue)) return;
|
|
147
|
+
if (newValue !== prevPropsRef.current[propName]) {
|
|
148
|
+
parentUniformUpdate(instanceId, propName, newValue);
|
|
149
|
+
prevPropsRef.current[propName] = newValue;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error("Error updating uniforms:", error);
|
|
155
|
+
}
|
|
156
|
+
}, [
|
|
157
|
+
effectiveProps,
|
|
158
|
+
instanceId,
|
|
159
|
+
parentUniformUpdate
|
|
160
|
+
]);
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
try {
|
|
163
|
+
parentMetadataUpdate(instanceId, {
|
|
164
|
+
blendMode: props.blendMode || "normal",
|
|
165
|
+
opacity: props.opacity,
|
|
166
|
+
visible: props.visible === false ? false : true,
|
|
167
|
+
id: props.id,
|
|
168
|
+
mask: props.maskSource ? {
|
|
169
|
+
source: props.maskSource,
|
|
170
|
+
type: props.maskType || "alpha"
|
|
171
|
+
} : void 0,
|
|
172
|
+
maps: mapsFromProps,
|
|
173
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
174
|
+
transform: effectiveTransform,
|
|
175
|
+
boundingBox: effectiveBoundingBox,
|
|
176
|
+
flow: props.flow,
|
|
177
|
+
absolute: props.absolute
|
|
178
|
+
});
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.error("Error updating metadata:", error);
|
|
181
|
+
}
|
|
182
|
+
}, [
|
|
183
|
+
props.blendMode,
|
|
184
|
+
props.opacity,
|
|
185
|
+
props.visible,
|
|
186
|
+
props.maskSource,
|
|
187
|
+
props.maskType,
|
|
188
|
+
props.renderOrder,
|
|
189
|
+
props.id,
|
|
190
|
+
mapsFromProps,
|
|
191
|
+
effectiveTransform,
|
|
192
|
+
effectiveBoundingBox,
|
|
193
|
+
props.flow,
|
|
194
|
+
props.absolute,
|
|
195
|
+
instanceId,
|
|
196
|
+
parentMetadataUpdate
|
|
197
|
+
]);
|
|
198
|
+
if (props.ref && typeof props.ref === "function") try {
|
|
199
|
+
props.ref(null);
|
|
200
|
+
} catch (e) {}
|
|
201
|
+
const captureCanvas = isCapturesDOM && domMounted ? createPortal(/* @__PURE__ */ jsx("canvas", {
|
|
202
|
+
ref: captureCanvasRef,
|
|
203
|
+
"layoutsubtree": "",
|
|
204
|
+
width: captureSize.w,
|
|
205
|
+
height: captureSize.h,
|
|
206
|
+
style: {
|
|
207
|
+
position: "fixed",
|
|
208
|
+
inset: 0,
|
|
209
|
+
width: "100vw",
|
|
210
|
+
height: "100vh",
|
|
211
|
+
zIndex: -9999
|
|
212
|
+
},
|
|
213
|
+
children: props.children
|
|
214
|
+
}), document.body) : null;
|
|
215
|
+
return /* @__PURE__ */ jsxs(ShaderContext.Provider, {
|
|
216
|
+
value: childContextValue,
|
|
217
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
218
|
+
ref: markerRef,
|
|
219
|
+
style: MARKER_STYLE,
|
|
220
|
+
"data-shader-id": instanceId,
|
|
221
|
+
children: !isCapturesDOM && props.children
|
|
222
|
+
}), captureCanvas]
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
var Chrome_default = ShaderComponent;
|
|
226
|
+
export { ShaderComponent, Chrome_default as default };
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { ShaderContext } from "./Shader.js";
|
|
2
|
+
import { useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
import { createGpuUniformsMap, resolveBoundingBox } from "../core/index.js";
|
|
5
|
+
import { setColorSpaceMode } from "../core/utilities/transformations/index.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { componentDefinition } from "../core/shaders/Line/index.js";
|
|
8
|
+
function isPropDriver(value) {
|
|
9
|
+
return typeof value === "object" && value !== null && "type" in value && (value.type === "map" || value.type === "mouse" || value.type === "mouse-position" || value.type === "auto-animate");
|
|
10
|
+
}
|
|
11
|
+
function computeEffectiveProps(props, defaultProps$1) {
|
|
12
|
+
let baseProps = { ...defaultProps$1 };
|
|
13
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && value !== void 0 && !isPropDriver(value)) baseProps[key] = value;
|
|
14
|
+
return baseProps;
|
|
15
|
+
}
|
|
16
|
+
var MARKER_STYLE = { display: "contents" };
|
|
17
|
+
var DEFAULT_TRANSFORM = {
|
|
18
|
+
offsetX: 0,
|
|
19
|
+
offsetY: 0,
|
|
20
|
+
rotation: 0,
|
|
21
|
+
scale: 1,
|
|
22
|
+
anchorX: .5,
|
|
23
|
+
anchorY: .5,
|
|
24
|
+
edges: "transparent"
|
|
25
|
+
};
|
|
26
|
+
var defaultProps = {
|
|
27
|
+
blendMode: "normal",
|
|
28
|
+
visible: true
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
if (componentDefinition && componentDefinition.props) Object.entries(componentDefinition.props).forEach(([key, config]) => {
|
|
32
|
+
const propConfig = config;
|
|
33
|
+
if (propConfig && typeof propConfig === "object" && "default" in propConfig) defaultProps[key] = propConfig.default;
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.warn("Error extracting default props:", e);
|
|
37
|
+
}
|
|
38
|
+
const ShaderComponent = (props) => {
|
|
39
|
+
const context = useContext(ShaderContext);
|
|
40
|
+
if (!context) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
41
|
+
const { shaderParentId: parentId, shaderNodeRegister: parentRegister, shaderUniformUpdate: parentUniformUpdate, shaderMetadataUpdate: parentMetadataUpdate, shaderColorSpace } = context;
|
|
42
|
+
const reactId = useId();
|
|
43
|
+
const instanceId = useMemo(() => {
|
|
44
|
+
return (props.id ? props.id.replace(/[^a-zA-Z0-9_]/g, "_") : null) || reactId.replace(/[^a-zA-Z0-9_]/g, "");
|
|
45
|
+
}, [props.id, reactId]);
|
|
46
|
+
const effectiveProps = useMemo(() => {
|
|
47
|
+
return computeEffectiveProps(props, defaultProps);
|
|
48
|
+
}, [props]);
|
|
49
|
+
const effectiveTransform = useMemo(() => ({
|
|
50
|
+
...DEFAULT_TRANSFORM,
|
|
51
|
+
...props.transform
|
|
52
|
+
}), [props.transform]);
|
|
53
|
+
const effectiveBoundingBox = useMemo(() => resolveBoundingBox(props.boundingBox), [props.boundingBox]);
|
|
54
|
+
const markerRef = useRef(null);
|
|
55
|
+
const isCapturesDOM = !!componentDefinition.capturesDOM;
|
|
56
|
+
const captureCanvasRef = useRef(null);
|
|
57
|
+
const [domMounted, setDomMounted] = useState(false);
|
|
58
|
+
const [captureSize, setCaptureSize] = useState(() => ({
|
|
59
|
+
w: typeof window !== "undefined" ? Math.round(window.innerWidth * Math.min(window.devicePixelRatio, 2)) : 0,
|
|
60
|
+
h: typeof window !== "undefined" ? Math.round(window.innerHeight * Math.min(window.devicePixelRatio, 2)) : 0
|
|
61
|
+
}));
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!isCapturesDOM) return;
|
|
64
|
+
setDomMounted(true);
|
|
65
|
+
const onResize = () => {
|
|
66
|
+
const d = Math.min(window.devicePixelRatio, 2);
|
|
67
|
+
setCaptureSize({
|
|
68
|
+
w: Math.round(window.innerWidth * d),
|
|
69
|
+
h: Math.round(window.innerHeight * d)
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
window.addEventListener("resize", onResize);
|
|
73
|
+
return () => window.removeEventListener("resize", onResize);
|
|
74
|
+
}, [isCapturesDOM]);
|
|
75
|
+
const detectedOrderRef = useRef(void 0);
|
|
76
|
+
const uniformsRef = useRef(null);
|
|
77
|
+
if (uniformsRef.current === null) {
|
|
78
|
+
setColorSpaceMode(shaderColorSpace);
|
|
79
|
+
uniformsRef.current = createGpuUniformsMap(componentDefinition, effectiveProps, instanceId);
|
|
80
|
+
}
|
|
81
|
+
const childContextValue = useMemo(() => {
|
|
82
|
+
return {
|
|
83
|
+
...context,
|
|
84
|
+
shaderParentId: instanceId
|
|
85
|
+
};
|
|
86
|
+
}, [context, instanceId]);
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!uniformsRef.current) return;
|
|
89
|
+
try {
|
|
90
|
+
const metadata = {
|
|
91
|
+
blendMode: props.blendMode || "normal",
|
|
92
|
+
opacity: props.opacity,
|
|
93
|
+
visible: props.visible === false ? false : true,
|
|
94
|
+
id: props.id,
|
|
95
|
+
mask: props.maskSource ? {
|
|
96
|
+
source: props.maskSource,
|
|
97
|
+
type: props.maskType || "alpha"
|
|
98
|
+
} : void 0,
|
|
99
|
+
maps: mapsFromProps,
|
|
100
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
101
|
+
transform: effectiveTransform,
|
|
102
|
+
boundingBox: effectiveBoundingBox,
|
|
103
|
+
flow: props.flow,
|
|
104
|
+
absolute: props.absolute
|
|
105
|
+
};
|
|
106
|
+
parentRegister(instanceId, componentDefinition.fragment, parentId, metadata, uniformsRef.current, componentDefinition, isCapturesDOM ? captureCanvasRef.current ?? void 0 : void 0);
|
|
107
|
+
return () => {
|
|
108
|
+
parentRegister(instanceId, null, null, null, null);
|
|
109
|
+
};
|
|
110
|
+
} catch (error) {
|
|
111
|
+
console.error("Error registering shader node:", error);
|
|
112
|
+
return () => {};
|
|
113
|
+
}
|
|
114
|
+
}, [
|
|
115
|
+
instanceId,
|
|
116
|
+
parentId,
|
|
117
|
+
parentRegister,
|
|
118
|
+
domMounted
|
|
119
|
+
]);
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
if (props.renderOrder === void 0 && markerRef.current) {
|
|
122
|
+
const parent = markerRef.current.parentElement;
|
|
123
|
+
if (parent) {
|
|
124
|
+
const siblings = parent.querySelectorAll(":scope > [data-shader-id]");
|
|
125
|
+
const position = Array.from(siblings).indexOf(markerRef.current);
|
|
126
|
+
if (position >= 0) {
|
|
127
|
+
detectedOrderRef.current = position;
|
|
128
|
+
parentMetadataUpdate(instanceId, { renderOrder: position });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, []);
|
|
133
|
+
const prevPropsRef = useRef({});
|
|
134
|
+
const mapsFromProps = useMemo(() => {
|
|
135
|
+
const maps = {};
|
|
136
|
+
for (const [key, value] of Object.entries(props)) if (key !== "children" && key !== "ref" && isPropDriver(value)) maps[key] = value;
|
|
137
|
+
return Object.keys(maps).length > 0 ? maps : void 0;
|
|
138
|
+
}, [props]);
|
|
139
|
+
useEffect(() => {
|
|
140
|
+
if (!uniformsRef.current) return;
|
|
141
|
+
try {
|
|
142
|
+
Object.entries(uniformsRef.current).forEach(([propName, uniformData]) => {
|
|
143
|
+
if (!uniformData || typeof uniformData !== "object") return;
|
|
144
|
+
if (uniformData.value !== void 0 && propName in effectiveProps) {
|
|
145
|
+
const newValue = effectiveProps[propName];
|
|
146
|
+
if (isPropDriver(newValue)) return;
|
|
147
|
+
if (newValue !== prevPropsRef.current[propName]) {
|
|
148
|
+
parentUniformUpdate(instanceId, propName, newValue);
|
|
149
|
+
prevPropsRef.current[propName] = newValue;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error("Error updating uniforms:", error);
|
|
155
|
+
}
|
|
156
|
+
}, [
|
|
157
|
+
effectiveProps,
|
|
158
|
+
instanceId,
|
|
159
|
+
parentUniformUpdate
|
|
160
|
+
]);
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
try {
|
|
163
|
+
parentMetadataUpdate(instanceId, {
|
|
164
|
+
blendMode: props.blendMode || "normal",
|
|
165
|
+
opacity: props.opacity,
|
|
166
|
+
visible: props.visible === false ? false : true,
|
|
167
|
+
id: props.id,
|
|
168
|
+
mask: props.maskSource ? {
|
|
169
|
+
source: props.maskSource,
|
|
170
|
+
type: props.maskType || "alpha"
|
|
171
|
+
} : void 0,
|
|
172
|
+
maps: mapsFromProps,
|
|
173
|
+
renderOrder: props.renderOrder ?? detectedOrderRef.current,
|
|
174
|
+
transform: effectiveTransform,
|
|
175
|
+
boundingBox: effectiveBoundingBox,
|
|
176
|
+
flow: props.flow,
|
|
177
|
+
absolute: props.absolute
|
|
178
|
+
});
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.error("Error updating metadata:", error);
|
|
181
|
+
}
|
|
182
|
+
}, [
|
|
183
|
+
props.blendMode,
|
|
184
|
+
props.opacity,
|
|
185
|
+
props.visible,
|
|
186
|
+
props.maskSource,
|
|
187
|
+
props.maskType,
|
|
188
|
+
props.renderOrder,
|
|
189
|
+
props.id,
|
|
190
|
+
mapsFromProps,
|
|
191
|
+
effectiveTransform,
|
|
192
|
+
effectiveBoundingBox,
|
|
193
|
+
props.flow,
|
|
194
|
+
props.absolute,
|
|
195
|
+
instanceId,
|
|
196
|
+
parentMetadataUpdate
|
|
197
|
+
]);
|
|
198
|
+
if (props.ref && typeof props.ref === "function") try {
|
|
199
|
+
props.ref(null);
|
|
200
|
+
} catch (e) {}
|
|
201
|
+
const captureCanvas = isCapturesDOM && domMounted ? createPortal(/* @__PURE__ */ jsx("canvas", {
|
|
202
|
+
ref: captureCanvasRef,
|
|
203
|
+
"layoutsubtree": "",
|
|
204
|
+
width: captureSize.w,
|
|
205
|
+
height: captureSize.h,
|
|
206
|
+
style: {
|
|
207
|
+
position: "fixed",
|
|
208
|
+
inset: 0,
|
|
209
|
+
width: "100vw",
|
|
210
|
+
height: "100vh",
|
|
211
|
+
zIndex: -9999
|
|
212
|
+
},
|
|
213
|
+
children: props.children
|
|
214
|
+
}), document.body) : null;
|
|
215
|
+
return /* @__PURE__ */ jsxs(ShaderContext.Provider, {
|
|
216
|
+
value: childContextValue,
|
|
217
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
218
|
+
ref: markerRef,
|
|
219
|
+
style: MARKER_STYLE,
|
|
220
|
+
"data-shader-id": instanceId,
|
|
221
|
+
children: !isCapturesDOM && props.children
|
|
222
|
+
}), captureCanvas]
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
var Line_default = ShaderComponent;
|
|
226
|
+
export { ShaderComponent, Line_default as default };
|
package/dist/react/Preview.js
CHANGED
|
@@ -136,6 +136,7 @@ var componentMap = {
|
|
|
136
136
|
Chevron: lazy(() => import("./Chevron.js")),
|
|
137
137
|
ChromaFlow: lazy(() => import("./ChromaFlow.js")),
|
|
138
138
|
ChromaticAberration: lazy(() => import("./ChromaticAberration.js")),
|
|
139
|
+
Chrome: lazy(() => import("./Chrome.js")),
|
|
139
140
|
Circle: lazy(() => import("./Circle.js")),
|
|
140
141
|
ColorWheel: lazy(() => import("./ColorWheel.js")),
|
|
141
142
|
CompressionArtifacts: lazy(() => import("./CompressionArtifacts.js")),
|
|
@@ -208,6 +209,7 @@ var componentMap = {
|
|
|
208
209
|
LensFlare: lazy(() => import("./LensFlare.js")),
|
|
209
210
|
LightEdge: lazy(() => import("./LightEdge.js")),
|
|
210
211
|
LightLeak: lazy(() => import("./LightLeak.js")),
|
|
212
|
+
Line: lazy(() => import("./Line.js")),
|
|
211
213
|
LinearBlur: lazy(() => import("./LinearBlur.js")),
|
|
212
214
|
LinearGradient: lazy(() => import("./LinearGradient.js")),
|
|
213
215
|
LinearWipe: lazy(() => import("./LinearWipe.js")),
|
package/dist/react/Shader.js
CHANGED
|
@@ -93,7 +93,7 @@ const Shader = ({ children, disableTelemetry = false, colorSpace = "p3-linear",
|
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
if (rendererRef.current.getPerformanceStats().fps > 0) {
|
|
96
|
-
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "3.0.
|
|
96
|
+
telemetryCollectorRef.current = startTelemetry(rendererRef.current, "3.0.453", disableTelemetry, isPreview);
|
|
97
97
|
if (telemetryCollectorRef.current) telemetryCollectorRef.current.start();
|
|
98
98
|
telemetryStartTimeoutRef.current = null;
|
|
99
99
|
} else telemetryStartTimeoutRef.current = window.setTimeout(checkRendering, 500);
|