shaders 3.0.452 → 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-BGPN-q7Q.js → AngularBlur-B0m-LKoD.js} +2 -2
- package/dist/core/{Arc-B3WUGG1Z.js → Arc-DhhcsMqr.js} +3 -3
- package/dist/core/{Ascii-MEJdXy2h.js → Ascii-BiFuRRQ1.js} +2 -2
- package/dist/core/{Aurora-BAafQuBz.js → Aurora-B35I8qRz.js} +4 -4
- package/dist/core/{BarShift-nVtvlHii.js → BarShift-C_waFkRO.js} +3 -3
- package/dist/core/{BarnDoors-D6E5jOl2.js → BarnDoors-Cnyfsla8.js} +2 -2
- package/dist/core/{Beam-D7IyWHAx.js → Beam-BPBmQMGD.js} +2 -2
- package/dist/core/{Bend-RtDgo8kD.js → Bend-Bq1Qlhq4.js} +2 -2
- package/dist/core/{Blob-DH-MnnS6.js → Blob-BtInePsq.js} +3 -3
- package/dist/core/{BlockDissolve-DIGuzCsR.js → BlockDissolve-i8V6gmZw.js} +3 -3
- package/dist/core/{BlockNoise-Drf4_hBO.js → BlockNoise-BfDNfyBP.js} +5 -5
- package/dist/core/{BlueNoise-CEwncn_5.js → BlueNoise-CNLIGPMW.js} +4 -4
- package/dist/core/{Blur-BbEw_oFx.js → Blur-B8NcZJdr.js} +3 -3
- package/dist/core/{Boids-D0-S7SI7.js → Boids-D51ZdvH0.js} +5 -5
- package/dist/core/{BokehBlur-CXBx5wog.js → BokehBlur-DO4V8nZ-.js} +4 -4
- package/dist/core/{BrickPattern-BKuDn_RF.js → BrickPattern-D21Nqxcj.js} +3 -3
- package/dist/core/{BrightnessContrast-ph33aPUw.js → BrightnessContrast-QxVeVMih.js} +1 -1
- package/dist/core/{BrushedMetal-CDtIZKcg.js → BrushedMetal-Xq4jMVz1.js} +142 -35
- package/dist/core/{Bulge-fgRLH3BN.js → Bulge-CdCqTfrp.js} +2 -2
- package/dist/core/{CRTScreen-CSRu7VZT.js → CRTScreen-D7WSk5fJ.js} +1 -1
- package/dist/core/{CarbonFiber-DXa8yomK.js → CarbonFiber-Dg-XleHg.js} +141 -34
- package/dist/core/{Chalkboard-UKLkHrLB.js → Chalkboard-B_YRavSR.js} +2 -2
- package/dist/core/{ChannelBlur-Bfl6C2nt.js → ChannelBlur-BmEILWdn.js} +2 -2
- package/dist/core/{CheckerWipe-DDUBzOJZ.js → CheckerWipe-Dbt7TTDK.js} +2 -2
- package/dist/core/{Checkerboard-CjRqLaQW.js → Checkerboard-BnWdSZLM.js} +2 -2
- package/dist/core/{Chevron-Bc0h2Rzv.js → Chevron-DsJK3THV.js} +3 -3
- package/dist/core/{ChromaFlow-wBzMJ-PA.js → ChromaFlow-Bj4rfeWl.js} +2 -2
- package/dist/core/{ChromaticAberration--78QtyKl.js → ChromaticAberration-C2UtSgN3.js} +2 -2
- package/dist/core/Chrome-CSrC5yk_.js +3692 -0
- package/dist/core/{Circle-sKqyx9pq.js → Circle-CJ4IbgBH.js} +3 -3
- package/dist/core/{ColorWheel-BLgkdEmc.js → ColorWheel-C_YLOL93.js} +3 -3
- package/dist/core/{CompressionArtifacts-C61W9yw2.js → CompressionArtifacts-BXto-pLr.js} +2 -2
- package/dist/core/{ConcentricSpin-BA-pPXA5.js → ConcentricSpin-1tArUXYX.js} +3 -3
- package/dist/core/{ConicGradient-DD2NOoA2.js → ConicGradient-Tw-pg593.js} +3 -3
- package/dist/core/{ContourLines-rxGkKb2q.js → ContourLines-CBFm0hjl.js} +2 -2
- package/dist/core/{CornerPin-CHkM91UE.js → CornerPin-BNgPHIHY.js} +2 -2
- package/dist/core/{Crescent-SDicMQui.js → Crescent-BKcpTzwd.js} +3 -3
- package/dist/core/{Cross-Bv1j7D12.js → Cross-CDUSIOgx.js} +3 -3
- package/dist/core/{Crystal-0oIYL_aS.js → Crystal-DN2WgBrm.js} +6 -6
- package/dist/core/{CurlNoise-BJCULaf9.js → CurlNoise-RsATuC8w.js} +5 -5
- package/dist/core/{CursorRipples-BLDfv2sS.js → CursorRipples-DbtJtDDl.js} +3 -3
- package/dist/core/{CursorTrail-ByRtE4T-.js → CursorTrail-yoPFtwk9.js} +4 -4
- package/dist/core/{DataMosh-zH8BS7dt.js → DataMosh-DabFQ-B5.js} +2 -2
- package/dist/core/{DiamondGradient-D6_jgke5.js → DiamondGradient-DbaUt2tC.js} +3 -3
- package/dist/core/{DiamondWipe-CeJJPxX6.js → DiamondWipe-Jth0vS7V.js} +2 -2
- package/dist/core/{DiffuseBlur-CPniI-42.js → DiffuseBlur-BZxj-iAt.js} +2 -2
- package/dist/core/{DisplacementMap-CCnnAPvB.js → DisplacementMap-31H7QPQl.js} +2 -2
- package/dist/core/{Dither-WIfj4N7O.js → Dither-BN-zSZ0l.js} +2 -2
- package/dist/core/{DotGrid-BhzPWYK4.js → DotGrid-BRDFAkBz.js} +3 -3
- package/dist/core/{DropShadow-D-YFgaHS.js → DropShadow-_lFvglPh.js} +2 -2
- package/dist/core/{Duotone-lXgv9Fip.js → Duotone-BhxXqh0S.js} +2 -2
- package/dist/core/{Ellipse-B1QfTjTA.js → Ellipse-NdZQjjl7.js} +3 -3
- package/dist/core/{Emboss-UmDoGSQF.js → Emboss--yOZdnyf.js} +5 -5
- package/dist/core/{Engraving-CN0OrgUo.js → Engraving-B26NgnCE.js} +3 -3
- package/dist/core/{ErosionNoise-Wu1fxJfJ.js → ErosionNoise-_uC5Hx2q.js} +4 -4
- package/dist/core/{Exposure-B5oEoUk-.js → Exposure-BM3eE3ol.js} +1 -1
- package/dist/core/{FallingLines-CsNVa3dc.js → FallingLines-BuczyepF.js} +3 -3
- package/dist/core/{FilmGrain-Br5EDq0B.js → FilmGrain-Dyy76ena.js} +1 -1
- package/dist/core/{FilmStock-BzaKrJRG.js → FilmStock-mi-H3Ul9.js} +3 -3
- package/dist/core/{Flip-HRnCpBGd.js → Flip-rZzkYscj.js} +2 -2
- package/dist/core/{FloatingParticles-DNGXQrHG.js → FloatingParticles-BbbTJldX.js} +5 -5
- package/dist/core/{FlowField-rJGiwKMI.js → FlowField-u0qYoqV2.js} +4 -4
- package/dist/core/{Flower-DGCyfNeJ.js → Flower--rN6c2HY.js} +3 -3
- package/dist/core/{FlowingGradient-CD6_NVZB.js → FlowingGradient-_zyM9KQn.js} +4 -4
- package/dist/core/{FlutedGlass-CrKD5b4k.js → FlutedGlass-C9-K6UQ7.js} +3 -3
- package/dist/core/{Fog-uK8ECyzk.js → Fog-2iNe3zZl.js} +3 -3
- package/dist/core/{Form3D-DQ7SxWFV.js → Form3D-Dmvpcqp1.js} +3 -3
- package/dist/core/{FractalNoise-DOU_jooR.js → FractalNoise-C8uudMNt.js} +5 -5
- package/dist/core/{Frost-BEnyt-CW.js → Frost-DV2zJSAL.js} +7 -7
- package/dist/core/{GaborNoise-CMt5270_.js → GaborNoise-Bty1hWmn.js} +5 -5
- package/dist/core/{Glass-CSJ1vRoj.js → Glass-CYmFGP1b.js} +6 -6
- package/dist/core/{GlassTiles-C3w1jqsb.js → GlassTiles-B3vyGos-.js} +1 -1
- package/dist/core/{Glitch-BxP1fWwQ.js → Glitch-DcjdwJep.js} +1 -1
- package/dist/core/{Glow-6yyCrCzW.js → Glow-D_nSsYo1.js} +3 -3
- package/dist/core/{Godrays-DsolPk6B.js → Godrays-lPn_O_W-.js} +3 -3
- package/dist/core/{Goo-Db0tOvqs.js → Goo-DxEB8kMF.js} +6 -6
- package/dist/core/{GradientMap-BfpgWnfm.js → GradientMap-7G6EOwy8.js} +2 -2
- package/dist/core/{Grayscale-DTrRYf14.js → Grayscale-BJz0olll.js} +1 -1
- package/dist/core/{Grid-COJiaxy5.js → Grid-D8ewrixy.js} +2 -2
- package/dist/core/{GridDistortion-Du7cRxX_.js → GridDistortion-CSBRousF.js} +3 -3
- package/dist/core/{Group-BKumfLn_.js → Group-BSg6a8Ro.js} +1 -1
- package/dist/core/{HTMLInCanvas-CtKAkjSy.js → HTMLInCanvas-DnQ0ZY38.js} +1 -1
- package/dist/core/{Halftone-CwWlH4Zi.js → Halftone-B2C55h6_.js} +2 -2
- package/dist/core/{Heart-C-BeqQH8.js → Heart-0eDZ50ZK.js} +3 -3
- package/dist/core/{Heatmap-D-61Tysu.js → Heatmap-BdExXQBU.js} +7 -7
- package/dist/core/{HexGrid-BxgXRDm3.js → HexGrid-B6UygS6q.js} +2 -2
- package/dist/core/{Hologram-DIgdhf5F.js → Hologram-D_eqqb8P.js} +7 -7
- package/dist/core/{Holographic-BNMw20mj.js → Holographic-Ctrsya3k.js} +7 -7
- package/dist/core/{HueShift-CiG-leUg.js → HueShift-CFXxhPpm.js} +1 -1
- package/dist/core/{ImageTexture-56vkFGyi.js → ImageTexture-B5oPuXeI.js} +3 -3
- package/dist/core/{InkFlow-DgS686Pl.js → InkFlow-C7l_qlaJ.js} +3 -3
- package/dist/core/{Invert-QtF0OVwG.js → Invert-Bya7lBpK.js} +1 -1
- package/dist/core/{IrisWipe-BEtEyvcI.js → IrisWipe-Dg9iiTjF.js} +2 -2
- package/dist/core/{IsometricCubes-C87okilH.js → IsometricCubes-CC-l8cnR.js} +2 -2
- package/dist/core/{Kaleidoscope-Ue2Atc25.js → Kaleidoscope-DhvQTJdp.js} +2 -2
- package/dist/core/{KeyFrames-Bb_6EmyV.js → KeyFrames-ZTsc7rtN.js} +3 -3
- package/dist/core/{LensDistortion-DxhU8nws.js → LensDistortion-KiZJXFKC.js} +2 -2
- package/dist/core/{LensFlare-YXo4zdAn.js → LensFlare-D5fr8RPA.js} +3 -3
- package/dist/core/{LightEdge-BzESg64B.js → LightEdge-D0NOWDh7.js} +7 -7
- package/dist/core/{LightLeak-BQKAeM6h.js → LightLeak-DdaidQ1D.js} +4 -4
- package/dist/core/Line-B5DIIWBz.js +1428 -0
- package/dist/core/{LinearBlur-DaAraWV3.js → LinearBlur-CyQxSLS2.js} +2 -2
- package/dist/core/{LinearGradient-CL5FnVfT.js → LinearGradient-B8tyawJy.js} +3 -3
- package/dist/core/{LinearWipe-xR6RSzjC.js → LinearWipe-D5UkI1cK.js} +2 -2
- package/dist/core/{LiquidMetal-BRhwukdo.js → LiquidMetal-vARkyRL2.js} +230 -41
- package/dist/core/{Liquify-p_Gz_FHr.js → Liquify-Djnk6ryT.js} +3 -3
- package/dist/core/{MagneticFilings-DOvxWL0a.js → MagneticFilings-BfTe8-Jn.js} +5 -5
- package/dist/core/{Marble-CkYRfCV8.js → Marble-3s7VS-tT.js} +4 -4
- package/dist/core/{Mirror-CxoKC1gR.js → Mirror-Ck4Hzdd8.js} +2 -2
- package/dist/core/{MultiPointGradient-B4qZwcHL.js → MultiPointGradient-CdzqMTN9.js} +2 -2
- package/dist/core/{Neon-C2QmSiyi.js → Neon-B8iSfL5s.js} +5 -5
- package/dist/core/{NoiseDissolve-DaNRO71N.js → NoiseDissolve-Df70NgHI.js} +3 -3
- package/dist/core/{ObjectTracker-e4hHSKMw.js → ObjectTracker-CFpotAyg.js} +3 -3
- package/dist/core/{PagePeel-DT6GI9mV.js → PagePeel-Bmc4hBhO.js} +1 -1
- package/dist/core/{Paper-QrPBpeei.js → Paper-af7JgKOt.js} +2 -2
- package/dist/core/{Parallelogram-C_WrJLLX.js → Parallelogram-D7bW1gMV.js} +3 -3
- package/dist/core/{ParticleField-B1nL_L7A.js → ParticleField-FPUBkJmo.js} +4 -4
- package/dist/core/{ParticleFlow-w2G9pdt5.js → ParticleFlow-DfdDvN-j.js} +5 -5
- package/dist/core/{Particles-BsxM8Kbc.js → Particles-DZaTzOZP.js} +7 -7
- package/dist/core/{PerlinNoise-DqZj-I8R.js → PerlinNoise-DPaPG55C.js} +5 -5
- package/dist/core/{Perspective-BzxylO20.js → Perspective-DBzb7DC9.js} +2 -2
- package/dist/core/{PixelSort-Dm2iMElk.js → PixelSort-sqoLBmqR.js} +2 -2
- package/dist/core/{PixelThrow-gRTKhK8X.js → PixelThrow-arRYRlCO.js} +2 -2
- package/dist/core/{Pixelate-B8ZnTAOo.js → Pixelate-Ba_iNPwv.js} +1 -1
- package/dist/core/{Plasma-BEub5fXm.js → Plasma-zC1y0At6.js} +4 -4
- package/dist/core/{Plastic-DMJ99k56.js → Plastic-C-NBXCG-.js} +7 -7
- package/dist/core/{PolarCoordinates-DOhGjR_6.js → PolarCoordinates-CjV_EFpN.js} +2 -2
- package/dist/core/{Polygon-D0hD4asI.js → Polygon-0kVtkdec.js} +3 -3
- package/dist/core/{Posterize-OvT-UsAO.js → Posterize-BUt2MAqY.js} +1 -1
- package/dist/core/{Prism-DYBxTA6Z.js → Prism-BBSdqnRm.js} +3 -3
- package/dist/core/{ProgressiveBlur-Da5uOM1i.js → ProgressiveBlur-CQhyaOwl.js} +4 -4
- package/dist/core/{RadialGradient-o_6P-7Dn.js → RadialGradient-BXLBHnCC.js} +3 -3
- package/dist/core/{RadialWipe-gmGpyKWI.js → RadialWipe-DfJ3dL7p.js} +2 -2
- package/dist/core/{RandomBars-CrDa3Bam.js → RandomBars-B-EaAz9c.js} +3 -3
- package/dist/core/{ReactionDiffusion-DWTCvJJu.js → ReactionDiffusion-r1qHYWoB.js} +3 -3
- package/dist/core/{RectangularCoordinates-PM_QP9Cg.js → RectangularCoordinates-CFGiELUv.js} +2 -2
- package/dist/core/{ReflectivePlane-BpXGIShc.js → ReflectivePlane-BbKUjtUs.js} +4 -4
- package/dist/core/{Repeater-CE4LJUbK.js → Repeater-DZhhgwMr.js} +2 -2
- package/dist/core/{Ring-DObEwgX4.js → Ring-DFxV0XzX.js} +3 -3
- package/dist/core/{RippleWipe-DQNw1oen.js → RippleWipe-DFh-8SmT.js} +2 -2
- package/dist/core/{Ripples-DKMqucX3.js → Ripples-BG24IcNH.js} +3 -3
- package/dist/core/{RoundedRect-CFd87T89.js → RoundedRect-B2EDoIqT.js} +3 -3
- package/dist/core/{Saturation-BA0cEqnb.js → Saturation-DKbtxVNf.js} +1 -1
- package/dist/core/{Scratches-CvOYMmEB.js → Scratches-C40D6A1_.js} +5 -5
- package/dist/core/{Sharpness-B25UDMka.js → Sharpness-DygCiVsY.js} +1 -1
- package/dist/core/{Shatter-BSaxWBf3.js → Shatter-eVP3Mt9W.js} +3 -3
- package/dist/core/{SimplexNoise-X8ctCpRm.js → SimplexNoise-HorjLzId.js} +5 -5
- package/dist/core/{SineWave-BZpbJLxE.js → SineWave-CTIhqhO-.js} +3 -3
- package/dist/core/{SliceWipe-CgUPHf9K.js → SliceWipe-D3yX3CAm.js} +1 -1
- package/dist/core/{Smoke-B7xEP6sH.js → Smoke-CFr-A3JD.js} +4 -4
- package/dist/core/{SmokeFill-B0nTuWPV.js → SmokeFill-DglhxF4x.js} +6 -6
- package/dist/core/{SmokeFlow-B0Li2heA.js → SmokeFlow-CC1tfLRh.js} +4 -4
- package/dist/core/{Solarize-BFDNOt5j.js → Solarize-wvgIpPSb.js} +1 -1
- package/dist/core/{SolidColor-dYxjV0YF.js → SolidColor-CQ9bQ-k6.js} +1 -1
- package/dist/core/{Spherize-B6SvuqQJ.js → Spherize-N33ACzeM.js} +2 -2
- package/dist/core/{Spiral-CPZP_vQa.js → Spiral-NeLWfZ6k.js} +3 -3
- package/dist/core/{Star-CcfONMfP.js → Star-DqkPHXlP.js} +3 -3
- package/dist/core/{Stone-4agvCnSU.js → Stone-mVzuC5SK.js} +2 -2
- package/dist/core/{Strands-CmapxVwQ.js → Strands-C19HsqO_.js} +3 -3
- package/dist/core/{Stretch-C1LWL_wK.js → Stretch-CAGlZjVf.js} +2 -2
- package/dist/core/{Stripes-EOLd6RRs.js → Stripes-DH9wZV3F.js} +3 -3
- package/dist/core/{StudioBackground-C7jsxhTF.js → StudioBackground-DPsj_N10.js} +2 -2
- package/dist/core/{SunBurst-CW8v2t1A.js → SunBurst-D5p0QAnh.js} +3 -3
- package/dist/core/{Surface3D-GduOaT4l.js → Surface3D-HSAAGomd.js} +4 -4
- package/dist/core/{Swirl-DOWMWPUy.js → Swirl-C1lH2gAk.js} +3 -3
- package/dist/core/{Teardrop-D4g6UQ84.js → Teardrop-b8XQR6NO.js} +3 -3
- package/dist/core/{Text-BcmS8Qpt.js → Text-DPjLa6Eh.js} +3 -3
- package/dist/core/{ThinFilm-CA62fdTo.js → ThinFilm-DhpK-SoR.js} +5 -5
- package/dist/core/{TiltShift-CYsneEnY.js → TiltShift-e57KIilk.js} +4 -4
- package/dist/core/{TimeTrail-UGRKixHj.js → TimeTrail-CYofyeeE.js} +3 -3
- package/dist/core/{Tint-DjGTug2D.js → Tint-DBM82OkZ.js} +2 -2
- package/dist/core/{Trapezoid-bgyR835g.js → Trapezoid-DaIBhsop.js} +3 -3
- package/dist/core/{TriangularGrid-CUSkwEhh.js → TriangularGrid-CBOVJOcR.js} +3 -3
- package/dist/core/{Tritone-0AbzRJ53.js → Tritone-D6Dur2eo.js} +2 -2
- package/dist/core/{Truchet-C3rl-XiI.js → Truchet-sunCQd_E.js} +2 -2
- package/dist/core/{Twirl-CPZBpUkY.js → Twirl-D3-3HSuS.js} +2 -2
- package/dist/core/{VHS-BIeq0vbY.js → VHS-DtyeGxi8.js} +1 -1
- package/dist/core/{VenetianBlinds-sWQYWM0-.js → VenetianBlinds-H8OVGxhT.js} +2 -2
- package/dist/core/{Vesica-CG1x-_aG.js → Vesica-C8MrL_up.js} +3 -3
- package/dist/core/{Vibrance-gTtCSaNa.js → Vibrance-B8gBhQS7.js} +1 -1
- package/dist/core/{VideoTexture-DqfCv_YE.js → VideoTexture--U8aiyP1.js} +2 -2
- package/dist/core/{Vignette-y7R3ujxN.js → Vignette-yIXlpfCE.js} +2 -2
- package/dist/core/{Voronoi--B90OaVd.js → Voronoi-BW4RE3MQ.js} +3 -3
- package/dist/core/{Water-BvymB3Av.js → Water-uLbQQrt-.js} +7 -7
- package/dist/core/{Watercolor-C7vDF39A.js → Watercolor-CcZ0fVEu.js} +3 -3
- package/dist/core/{WaveDistortion-DMfhW-zm.js → WaveDistortion-DasSsVxv.js} +3 -3
- package/dist/core/{WaveletNoise-CqnpQKOm.js → WaveletNoise-DpRWc5Qw.js} +5 -5
- package/dist/core/{Weave-CcYi9PzL.js → Weave-CLGYIcmf.js} +2 -2
- package/dist/core/{WebcamTexture-C_tF_65y.js → WebcamTexture--GTVU-Bm.js} +3 -3
- package/dist/core/{Wool-CpI-Xd6P.js → Wool-uy61uieK.js} +2 -2
- package/dist/core/{WorleyNoise-DqYFie3m.js → WorleyNoise-i7i0azT8.js} +3 -3
- package/dist/core/{ZoomBlur-CSFf3Q4x.js → ZoomBlur-OQP2jw3F.js} +2 -2
- package/dist/core/{agents-BuYW06Wk.js → agents-BVhq_Z2T.js} +1 -1
- package/dist/core/bevel-BGAb1fb2.js +121 -0
- package/dist/core/{blur-BAqURXkj.js → blur-cLcFzL4x.js} +2 -2
- package/dist/core/{compute-DYJOCqJI.js → compute-Ax-p6Ubc.js} +1 -1
- package/dist/core/{edges-Dm0I-Ud7.js → edges-B7Yet3LV.js} +1 -1
- package/dist/core/{glass-ClmiwTb0.js → glass-CNFJB2On.js} +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/index.d.ts +1 -0
- package/dist/core/gpu/kit/effects/index.d.ts.map +1 -1
- package/dist/core/index.js +210 -207
- package/dist/core/{media-_wFh8vJm.js → media-Y-WxQcQD.js} +1 -1
- package/dist/core/{noise-C_ZfgxTN.js → noise-B-PI7JUx.js} +1 -1
- package/dist/core/{noiseColor-88y7I7KI.js → noiseColor-BQAO-Rjk.js} +2 -2
- package/dist/core/{noiseColor-Buljb-6r.js → noiseColor-Cgx-FS2o.js} +2 -2
- package/dist/core/{noiseStylize-7YW6DiP4.js → noiseStylize-BN5zji1E.js} +2 -2
- package/dist/core/{porters-DnWlc17D.js → porters-D_xmIPz2.js} +2 -2
- package/dist/core/registry.js +210 -207
- package/dist/core/{sdf-B5E-Vv1j.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.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.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-CjOvQ3n3.js → shapeEffectBounds-Svfd_R5a.js} +3 -3
- package/dist/core/utilities/transformations/index.js +1 -1
- package/dist/js/bundle.js +88 -88
- 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 +75 -75
- 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 +1260 -136
- 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-DwraFv9_.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);
|