shaders 2.5.94 → 2.5.96
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/core/Blur-CXXttTb1.js +138 -0
- package/dist/core/{ChannelBlur-CCaPXjka.js → ChannelBlur-gzP71FWd.js} +37 -2
- package/dist/core/{Crescent-DPxGWdPH.js → Crescent-BkRt-XWy.js} +1 -1
- package/dist/core/{Cross-CDyzf8TT.js → Cross-kkY7feuC.js} +1 -1
- package/dist/core/{Crystal-DSuN8TNY.js → Crystal-xVyUhVD-.js} +1 -1
- package/dist/core/CursorRipples-Cgm7N0Bp.js +289 -0
- package/dist/core/CursorTrail-CCRbdwHJ.js +263 -0
- package/dist/core/{Ellipse-BNmzdnpK.js → Ellipse-CXxGqTYI.js} +1 -1
- package/dist/core/{Emboss-nrduRrVs.js → Emboss-ClQV27Mt.js} +1 -1
- package/dist/core/{Flower-B4xPp0Qa.js → Flower-MAwlZEv8.js} +1 -1
- package/dist/core/{Glass-CRfTkmRy.js → Glass-DDBKYclp.js} +46 -8
- package/dist/core/Glow-BwaPYDRZ.js +174 -0
- package/dist/core/GridDistortion-DtaRNrTZ.js +278 -0
- package/dist/core/Liquify-cE5dxrfh.js +351 -0
- package/dist/core/{Neon-CUKnkAK8.js → Neon-Dg8UfC7P.js} +1 -1
- package/dist/core/{Polygon-C1y6Nyh4.js → Polygon-DRCs3CYs.js} +1 -1
- package/dist/core/ProgressiveBlur-B8xwWyTM.js +236 -0
- package/dist/core/{Ring-Chj1tp_P.js → Ring-QApyKPzE.js} +1 -1
- package/dist/core/{RoundedRect-BEj6tE1e.js → RoundedRect-Ca9af9xe.js} +1 -1
- package/dist/core/{Shatter-CZMOHj60.js → Shatter-BssZTRYJ.js} +154 -66
- package/dist/core/{Star-fPw1j10r.js → Star-DiXwnPGP.js} +1 -1
- package/dist/core/TiltShift-CI3FlfYk.js +252 -0
- package/dist/core/{Trapezoid-Cr61vRvN.js → Trapezoid-BX_hmeZJ.js} +1 -1
- package/dist/core/{Vesica-AXTA8DJU.js → Vesica-DU0f85NG.js} +1 -1
- package/dist/core/{VideoTexture-BobyGZGr.js → VideoTexture-DJrkry82.js} +1 -1
- package/dist/core/{WebcamTexture-BXj7sqND.js → WebcamTexture-Cf8J7JB1.js} +1 -1
- package/dist/core/computeBlur-C3oX720H.js +141 -0
- package/dist/core/effects/glass.d.ts +1 -1
- package/dist/core/effects/glass.d.ts.map +1 -1
- package/dist/core/index.js +213 -128
- package/dist/core/registry.js +102 -101
- package/dist/core/renderer.d.ts +19 -1
- package/dist/core/renderer.d.ts.map +1 -1
- package/dist/core/shaderRegistry-B_84rvO8.js +244 -0
- package/dist/core/shaders/Blur/index.d.ts.map +1 -1
- package/dist/core/shaders/Blur/index.js +2 -1
- package/dist/core/shaders/BrightnessContrast/index.js +1 -1
- package/dist/core/shaders/Bulge/index.js +1 -1
- package/dist/core/shaders/CRTScreen/index.js +1 -1
- package/dist/core/shaders/ChannelBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +2 -1
- package/dist/core/shaders/Checkerboard/index.js +1 -1
- package/dist/core/shaders/ChromaFlow/index.js +1 -1
- package/dist/core/shaders/ChromaticAberration/index.js +1 -1
- package/dist/core/shaders/Circle/index.js +1 -1
- package/dist/core/shaders/ConcentricSpin/index.js +1 -1
- package/dist/core/shaders/ConicGradient/index.js +1 -1
- package/dist/core/shaders/ContourLines/index.js +1 -1
- package/dist/core/shaders/Crescent/index.js +2 -2
- package/dist/core/shaders/Cross/index.js +2 -2
- package/dist/core/shaders/Crystal/index.js +2 -2
- package/dist/core/shaders/CursorRipples/index.d.ts.map +1 -1
- package/dist/core/shaders/CursorRipples/index.js +1 -1
- package/dist/core/shaders/CursorTrail/index.d.ts.map +1 -1
- package/dist/core/shaders/CursorTrail/index.js +1 -1
- package/dist/core/shaders/DOMTexture/index.js +1 -1
- package/dist/core/shaders/DiamondGradient/index.js +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +1 -1
- package/dist/core/shaders/Dither/index.js +1 -1
- package/dist/core/shaders/DotGrid/index.js +1 -1
- package/dist/core/shaders/DropShadow/index.js +1 -1
- package/dist/core/shaders/Duotone/index.js +1 -1
- package/dist/core/shaders/Ellipse/index.js +2 -2
- package/dist/core/shaders/Emboss/index.js +2 -2
- package/dist/core/shaders/FallingLines/index.js +1 -1
- package/dist/core/shaders/FilmGrain/index.js +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +1 -1
- package/dist/core/shaders/FlowField/index.js +1 -1
- package/dist/core/shaders/Flower/index.js +2 -2
- package/dist/core/shaders/FlowingGradient/index.js +1 -1
- package/dist/core/shaders/Form3D/index.js +1 -1
- package/dist/core/shaders/Glass/index.d.ts.map +1 -1
- package/dist/core/shaders/Glass/index.js +3 -2
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glitch/index.js +1 -1
- package/dist/core/shaders/Glow/index.d.ts.map +1 -1
- package/dist/core/shaders/Glow/index.js +2 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Grayscale/index.js +1 -1
- package/dist/core/shaders/Grid/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Group/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/HexGrid/index.js +1 -1
- package/dist/core/shaders/HueShift/index.js +1 -1
- package/dist/core/shaders/ImageTexture/index.js +1 -1
- package/dist/core/shaders/Invert/index.js +1 -1
- package/dist/core/shaders/Kaleidoscope/index.js +1 -1
- package/dist/core/shaders/LensFlare/index.js +1 -1
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Mirror/index.js +1 -1
- package/dist/core/shaders/MultiPointGradient/index.js +1 -1
- package/dist/core/shaders/Neon/index.js +2 -2
- package/dist/core/shaders/Paper/index.js +1 -1
- package/dist/core/shaders/Perspective/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/Plasma/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/Polygon/index.js +2 -2
- package/dist/core/shaders/Posterize/index.js +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +2 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ring/index.js +2 -2
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/RoundedRect/index.js +2 -2
- package/dist/core/shaders/Saturation/index.js +1 -1
- package/dist/core/shaders/Sharpness/index.js +1 -1
- package/dist/core/shaders/Shatter/index.d.ts.map +1 -1
- package/dist/core/shaders/Shatter/index.js +1 -1
- package/dist/core/shaders/SimplexNoise/index.js +1 -1
- package/dist/core/shaders/SineWave/index.js +1 -1
- package/dist/core/shaders/Solarize/index.js +1 -1
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +1 -1
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Star/index.js +2 -2
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Stripes/index.js +1 -1
- package/dist/core/shaders/StudioBackground/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +2 -1
- package/dist/core/shaders/Tint/index.js +1 -1
- package/dist/core/shaders/Trapezoid/index.js +2 -2
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Truchet/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vesica/index.js +2 -2
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/VideoTexture/index.js +2 -2
- package/dist/core/shaders/Vignette/index.js +1 -1
- package/dist/core/shaders/Voronoi/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/Weave/index.js +1 -1
- package/dist/core/shaders/WebcamTexture/index.js +2 -2
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/core/types.d.ts +49 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utilities/computeBlur.d.ts +50 -0
- package/dist/core/utilities/computeBlur.d.ts.map +1 -0
- package/dist/js/createShader.js +1 -1
- package/dist/react/Shader.js +1 -1
- package/dist/registry.js +2 -2
- package/dist/solid/engine/Shader.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/package.json +1 -1
- package/dist/core/Blur-DTyNQt1R.js +0 -78
- package/dist/core/CursorRipples-Bo-3LZoC.js +0 -186
- package/dist/core/CursorTrail-C-0lpOV1.js +0 -160
- package/dist/core/Glow-CKWIRcBt.js +0 -108
- package/dist/core/GridDistortion-DXM5MgSc.js +0 -183
- package/dist/core/Liquify-CqcAWBwZ.js +0 -228
- package/dist/core/ProgressiveBlur-BcHBSVDo.js +0 -128
- package/dist/core/TiltShift-BysRsV8v.js +0 -141
- package/dist/core/shaderRegistry-BzOzMO4V.js +0 -244
- /package/dist/core/{BrightnessContrast-BoR9bi58.js → BrightnessContrast-CJTOpQCn.js} +0 -0
- /package/dist/core/{Bulge-DN2R75Hp.js → Bulge-Chpbxxzj.js} +0 -0
- /package/dist/core/{CRTScreen-DolQEkb1.js → CRTScreen-CTwXU-NX.js} +0 -0
- /package/dist/core/{Checkerboard-_IUtUrDv.js → Checkerboard-ucave4-a.js} +0 -0
- /package/dist/core/{ChromaFlow-Cq6hDVjX.js → ChromaFlow-BZXyVHtK.js} +0 -0
- /package/dist/core/{ChromaticAberration-G8_bwQtD.js → ChromaticAberration-DsMj-vBw.js} +0 -0
- /package/dist/core/{Circle--0oHzoCi.js → Circle-QgCuVo44.js} +0 -0
- /package/dist/core/{ConcentricSpin-BzxzMieZ.js → ConcentricSpin-Crfxti93.js} +0 -0
- /package/dist/core/{ConicGradient-BXXizzIs.js → ConicGradient-CQAPYlQg.js} +0 -0
- /package/dist/core/{ContourLines-C0XSJEkE.js → ContourLines-KTHC32hd.js} +0 -0
- /package/dist/core/{DOMTexture-Dw3Qakny.js → DOMTexture-D-RkeyMs.js} +0 -0
- /package/dist/core/{DiamondGradient-TsOxHjg_.js → DiamondGradient-BC3ugP8a.js} +0 -0
- /package/dist/core/{DiffuseBlur-BqIV4JLM.js → DiffuseBlur-eyM1v3ad.js} +0 -0
- /package/dist/core/{Dither-D_YF6z03.js → Dither-CDfDotR6.js} +0 -0
- /package/dist/core/{DotGrid-CiDt4NmI.js → DotGrid-T9YbgC3V.js} +0 -0
- /package/dist/core/{DropShadow-BRoXryDA.js → DropShadow-jMhnYPXZ.js} +0 -0
- /package/dist/core/{Duotone-CGHcHB9f.js → Duotone-Bl02WcA2.js} +0 -0
- /package/dist/core/{FallingLines-vdw8KxhV.js → FallingLines-CArEXajJ.js} +0 -0
- /package/dist/core/{FilmGrain-BqQeKO6Z.js → FilmGrain-Ph73aoC_.js} +0 -0
- /package/dist/core/{FloatingParticles-DR5cv6Eh.js → FloatingParticles-BtwGRl_d.js} +0 -0
- /package/dist/core/{FlowField-DpP32B1X.js → FlowField-RyqiRxyI.js} +0 -0
- /package/dist/core/{FlowingGradient-lSouJxmq.js → FlowingGradient-C0Zoyfd6.js} +0 -0
- /package/dist/core/{Form3D-DQD-0zrd.js → Form3D-rKpxb9t3.js} +0 -0
- /package/dist/core/{GlassTiles-B7aAvcTQ.js → GlassTiles-k1C4a4u8.js} +0 -0
- /package/dist/core/{Glitch-CgmgjLea.js → Glitch-DzPMkBu4.js} +0 -0
- /package/dist/core/{Godrays-o-3Im6H1.js → Godrays-DAYmq-BP.js} +0 -0
- /package/dist/core/{Grayscale-Bip62olI.js → Grayscale-lYKBBkGY.js} +0 -0
- /package/dist/core/{Grid-hwQnF_hs.js → Grid-BJ-nxN3i.js} +0 -0
- /package/dist/core/{Group-BexPm4Fb.js → Group-DpozigtX.js} +0 -0
- /package/dist/core/{Halftone-onLYU4dF.js → Halftone-BVL2oy37.js} +0 -0
- /package/dist/core/{HexGrid-BkqEEgfh.js → HexGrid-D-EmQ4kI.js} +0 -0
- /package/dist/core/{HueShift-BldS-av9.js → HueShift-D9K0ynaS.js} +0 -0
- /package/dist/core/{ImageTexture-DLCjc5cM.js → ImageTexture-CArkZMfh.js} +0 -0
- /package/dist/core/{Invert-C2LI5GXr.js → Invert-DCnwo_Xq.js} +0 -0
- /package/dist/core/{Kaleidoscope-CxWjs5jx.js → Kaleidoscope-BytHro3k.js} +0 -0
- /package/dist/core/{LensFlare-BNO7tCXH.js → LensFlare-B0vv4x97.js} +0 -0
- /package/dist/core/{LinearBlur-Ds6rm8u-.js → LinearBlur-BFewxPjV.js} +0 -0
- /package/dist/core/{LinearGradient-BZjDhnZp.js → LinearGradient-BKUf_u7r.js} +0 -0
- /package/dist/core/{Mirror-5W3sul9v.js → Mirror-DIle92J8.js} +0 -0
- /package/dist/core/{MultiPointGradient-lpUGnrLq.js → MultiPointGradient-DDwac_mm.js} +0 -0
- /package/dist/core/{Paper-14yYPnWW.js → Paper-bMSMCeYK.js} +0 -0
- /package/dist/core/{Perspective-POVbIGPc.js → Perspective-BmfvQV6W.js} +0 -0
- /package/dist/core/{Pixelate-CxUxBDeN.js → Pixelate-Dl26r6IT.js} +0 -0
- /package/dist/core/{Plasma-DM9TU0VN.js → Plasma-CJWS1TvX.js} +0 -0
- /package/dist/core/{PolarCoordinates-t4Wa00gQ.js → PolarCoordinates-lq6K4WBm.js} +0 -0
- /package/dist/core/{Posterize-Dk4DE8Ee.js → Posterize-BjH7Zscm.js} +0 -0
- /package/dist/core/{RadialGradient-CSXQIa5L.js → RadialGradient-DiGFPgrn.js} +0 -0
- /package/dist/core/{RectangularCoordinates-YaZ_uRXb.js → RectangularCoordinates-COkNDxi0.js} +0 -0
- /package/dist/core/{Ripples-wJx2FwJY.js → Ripples-C8Q17Hvz.js} +0 -0
- /package/dist/core/{Saturation-B500nPZH.js → Saturation-CgDaiq6n.js} +0 -0
- /package/dist/core/{Sharpness-NqY4_gKZ.js → Sharpness-CRXT0D30.js} +0 -0
- /package/dist/core/{SimplexNoise-2-J7EbY9.js → SimplexNoise-KfTCAfpL.js} +0 -0
- /package/dist/core/{SineWave-OWJVWsI1.js → SineWave-Ckeap_YM.js} +0 -0
- /package/dist/core/{Solarize-CEhQxL9Z.js → Solarize-DhtQYYpW.js} +0 -0
- /package/dist/core/{SolidColor-Dlzm61ZG.js → SolidColor-6yUkGybH.js} +0 -0
- /package/dist/core/{Spherize-CXf4_Mkm.js → Spherize-8LXrGGG_.js} +0 -0
- /package/dist/core/{Spiral-CSXNX92f.js → Spiral-Bs7uZrBr.js} +0 -0
- /package/dist/core/{Strands-BPVy1zbt.js → Strands-DsAAVemq.js} +0 -0
- /package/dist/core/{Stretch-CFAjfvny.js → Stretch-D7P2R5lV.js} +0 -0
- /package/dist/core/{Stripes-BSGzno-I.js → Stripes-DF8agIiJ.js} +0 -0
- /package/dist/core/{StudioBackground-81AihXcZ.js → StudioBackground-BFeNfwEu.js} +0 -0
- /package/dist/core/{Swirl-D_ZvZtDS.js → Swirl-BwezrSAA.js} +0 -0
- /package/dist/core/{Tint-C6xN-Qot.js → Tint-BdXlqlzz.js} +0 -0
- /package/dist/core/{Tritone-Dk8GcpYo.js → Tritone-BlJ7cchN.js} +0 -0
- /package/dist/core/{Truchet-BFd2XYD3.js → Truchet-Bnn0fwbF.js} +0 -0
- /package/dist/core/{Twirl-CA0r8U7e.js → Twirl-C5ijhqz1.js} +0 -0
- /package/dist/core/{Vibrance-Dq1jBFJb.js → Vibrance-dqIV6GBe.js} +0 -0
- /package/dist/core/{Vignette-DB8x78Up.js → Vignette-DB1wO1dm.js} +0 -0
- /package/dist/core/{Voronoi-ALXxxHBo.js → Voronoi-C3WIJFWc.js} +0 -0
- /package/dist/core/{WaveDistortion-CHb75HO3.js → WaveDistortion-BKma8-Ju.js} +0 -0
- /package/dist/core/{Weave-j4CrCig4.js → Weave-xuu_vQ5e.js} +0 -0
- /package/dist/core/{ZoomBlur-Cl75kL8E.js → ZoomBlur-UcS2iFT2.js} +0 -0
- /package/dist/core/{browser-DIoaEnIX.js → browser-ClWxLlIB.js} +0 -0
- /package/dist/core/{sdf-Bux00UoZ.js → sdf-DyC2H_qS.js} +0 -0
package/dist/core/index.js
CHANGED
|
@@ -8,107 +8,108 @@ import { t as createAnimatedTime } from "./time-DUqSFWvT.js";
|
|
|
8
8
|
import "./Aurora-BPHeGEZ_.js";
|
|
9
9
|
import "./Beam-CAnoOWgt.js";
|
|
10
10
|
import "./Blob-CuRSRXmA.js";
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import "./
|
|
19
|
-
import "./
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import "./
|
|
32
|
-
import "./
|
|
33
|
-
import "./
|
|
34
|
-
import "./
|
|
35
|
-
import "./
|
|
36
|
-
import "./
|
|
37
|
-
import "./
|
|
38
|
-
import "./
|
|
39
|
-
import "./
|
|
40
|
-
import "./
|
|
41
|
-
import "./
|
|
42
|
-
import "./
|
|
43
|
-
import "./
|
|
44
|
-
import "./
|
|
45
|
-
import "./
|
|
46
|
-
import "./
|
|
47
|
-
import "./
|
|
48
|
-
import "./
|
|
49
|
-
import "./
|
|
50
|
-
import "./
|
|
51
|
-
import "./
|
|
52
|
-
import "./
|
|
53
|
-
import "./
|
|
54
|
-
import "./
|
|
55
|
-
import "./
|
|
56
|
-
import "./
|
|
57
|
-
import "./
|
|
58
|
-
import "./
|
|
59
|
-
import "./
|
|
60
|
-
import "./
|
|
61
|
-
import "./
|
|
62
|
-
import "./
|
|
63
|
-
import "./
|
|
64
|
-
import "./
|
|
65
|
-
import "./
|
|
66
|
-
import "./
|
|
67
|
-
import "./
|
|
68
|
-
import "./
|
|
69
|
-
import "./
|
|
70
|
-
import "./
|
|
71
|
-
import "./
|
|
72
|
-
import "./
|
|
73
|
-
import "./
|
|
74
|
-
import "./
|
|
75
|
-
import "./
|
|
76
|
-
import "./
|
|
77
|
-
import "./
|
|
78
|
-
import "./
|
|
79
|
-
import "./
|
|
80
|
-
import "./
|
|
81
|
-
import "./
|
|
82
|
-
import "./
|
|
83
|
-
import "./
|
|
84
|
-
import "./
|
|
85
|
-
import "./
|
|
86
|
-
import "./
|
|
87
|
-
import "./
|
|
88
|
-
import "./
|
|
89
|
-
import "./
|
|
90
|
-
import "./
|
|
91
|
-
import "./
|
|
92
|
-
import "./
|
|
93
|
-
import "./
|
|
94
|
-
import "./
|
|
95
|
-
import "./
|
|
96
|
-
import "./
|
|
97
|
-
import "./
|
|
98
|
-
import "./
|
|
99
|
-
import "./
|
|
100
|
-
import "./
|
|
101
|
-
import "./
|
|
102
|
-
import "./
|
|
103
|
-
import "./
|
|
104
|
-
import "./
|
|
105
|
-
import "./
|
|
106
|
-
import "./
|
|
107
|
-
import "./
|
|
108
|
-
import "./
|
|
109
|
-
import "./
|
|
110
|
-
import "./
|
|
111
|
-
import
|
|
11
|
+
import "./computeBlur-C3oX720H.js";
|
|
12
|
+
import "./Blur-CXXttTb1.js";
|
|
13
|
+
import "./BrightnessContrast-CJTOpQCn.js";
|
|
14
|
+
import "./Bulge-Chpbxxzj.js";
|
|
15
|
+
import "./ChannelBlur-gzP71FWd.js";
|
|
16
|
+
import "./Checkerboard-ucave4-a.js";
|
|
17
|
+
import "./ChromaFlow-BZXyVHtK.js";
|
|
18
|
+
import "./ChromaticAberration-DsMj-vBw.js";
|
|
19
|
+
import "./Circle-QgCuVo44.js";
|
|
20
|
+
import "./ConcentricSpin-Crfxti93.js";
|
|
21
|
+
import "./ConicGradient-CQAPYlQg.js";
|
|
22
|
+
import "./ContourLines-KTHC32hd.js";
|
|
23
|
+
import "./sdf-DyC2H_qS.js";
|
|
24
|
+
import "./Crescent-BkRt-XWy.js";
|
|
25
|
+
import "./Cross-kkY7feuC.js";
|
|
26
|
+
import "./CRTScreen-CTwXU-NX.js";
|
|
27
|
+
import "./Crystal-xVyUhVD-.js";
|
|
28
|
+
import "./CursorRipples-Cgm7N0Bp.js";
|
|
29
|
+
import "./CursorTrail-CCRbdwHJ.js";
|
|
30
|
+
import "./DiamondGradient-BC3ugP8a.js";
|
|
31
|
+
import "./DiffuseBlur-eyM1v3ad.js";
|
|
32
|
+
import "./Dither-CDfDotR6.js";
|
|
33
|
+
import "./DOMTexture-D-RkeyMs.js";
|
|
34
|
+
import "./DotGrid-T9YbgC3V.js";
|
|
35
|
+
import "./DropShadow-jMhnYPXZ.js";
|
|
36
|
+
import "./Duotone-Bl02WcA2.js";
|
|
37
|
+
import "./Ellipse-CXxGqTYI.js";
|
|
38
|
+
import "./Emboss-ClQV27Mt.js";
|
|
39
|
+
import "./FallingLines-CArEXajJ.js";
|
|
40
|
+
import "./FilmGrain-Ph73aoC_.js";
|
|
41
|
+
import "./FloatingParticles-BtwGRl_d.js";
|
|
42
|
+
import "./Flower-MAwlZEv8.js";
|
|
43
|
+
import "./FlowField-RyqiRxyI.js";
|
|
44
|
+
import "./FlowingGradient-C0Zoyfd6.js";
|
|
45
|
+
import "./Form3D-rKpxb9t3.js";
|
|
46
|
+
import "./Glass-DDBKYclp.js";
|
|
47
|
+
import "./GlassTiles-k1C4a4u8.js";
|
|
48
|
+
import "./Glitch-DzPMkBu4.js";
|
|
49
|
+
import "./Glow-BwaPYDRZ.js";
|
|
50
|
+
import "./Godrays-DAYmq-BP.js";
|
|
51
|
+
import "./Grayscale-lYKBBkGY.js";
|
|
52
|
+
import "./Grid-BJ-nxN3i.js";
|
|
53
|
+
import "./GridDistortion-DtaRNrTZ.js";
|
|
54
|
+
import "./Group-DpozigtX.js";
|
|
55
|
+
import "./Halftone-BVL2oy37.js";
|
|
56
|
+
import "./HexGrid-D-EmQ4kI.js";
|
|
57
|
+
import "./HueShift-D9K0ynaS.js";
|
|
58
|
+
import "./ImageTexture-CArkZMfh.js";
|
|
59
|
+
import "./Invert-DCnwo_Xq.js";
|
|
60
|
+
import "./Kaleidoscope-BytHro3k.js";
|
|
61
|
+
import "./LensFlare-B0vv4x97.js";
|
|
62
|
+
import "./LinearBlur-BFewxPjV.js";
|
|
63
|
+
import "./LinearGradient-BKUf_u7r.js";
|
|
64
|
+
import "./Liquify-cE5dxrfh.js";
|
|
65
|
+
import "./Mirror-DIle92J8.js";
|
|
66
|
+
import "./MultiPointGradient-DDwac_mm.js";
|
|
67
|
+
import "./Neon-Dg8UfC7P.js";
|
|
68
|
+
import "./Paper-bMSMCeYK.js";
|
|
69
|
+
import "./Perspective-BmfvQV6W.js";
|
|
70
|
+
import "./Pixelate-Dl26r6IT.js";
|
|
71
|
+
import "./Plasma-CJWS1TvX.js";
|
|
72
|
+
import "./PolarCoordinates-lq6K4WBm.js";
|
|
73
|
+
import "./Polygon-DRCs3CYs.js";
|
|
74
|
+
import "./Posterize-BjH7Zscm.js";
|
|
75
|
+
import "./ProgressiveBlur-B8xwWyTM.js";
|
|
76
|
+
import "./RadialGradient-DiGFPgrn.js";
|
|
77
|
+
import "./RectangularCoordinates-COkNDxi0.js";
|
|
78
|
+
import "./Ring-QApyKPzE.js";
|
|
79
|
+
import "./Ripples-C8Q17Hvz.js";
|
|
80
|
+
import "./RoundedRect-Ca9af9xe.js";
|
|
81
|
+
import "./Saturation-CgDaiq6n.js";
|
|
82
|
+
import "./Sharpness-CRXT0D30.js";
|
|
83
|
+
import "./Shatter-BssZTRYJ.js";
|
|
84
|
+
import "./SimplexNoise-KfTCAfpL.js";
|
|
85
|
+
import "./SineWave-Ckeap_YM.js";
|
|
86
|
+
import "./Solarize-DhtQYYpW.js";
|
|
87
|
+
import "./SolidColor-6yUkGybH.js";
|
|
88
|
+
import "./Spherize-8LXrGGG_.js";
|
|
89
|
+
import "./Spiral-Bs7uZrBr.js";
|
|
90
|
+
import "./Star-DiXwnPGP.js";
|
|
91
|
+
import "./Strands-DsAAVemq.js";
|
|
92
|
+
import "./Stretch-D7P2R5lV.js";
|
|
93
|
+
import "./Stripes-DF8agIiJ.js";
|
|
94
|
+
import "./StudioBackground-BFeNfwEu.js";
|
|
95
|
+
import "./Swirl-BwezrSAA.js";
|
|
96
|
+
import "./TiltShift-CI3FlfYk.js";
|
|
97
|
+
import "./Tint-BdXlqlzz.js";
|
|
98
|
+
import "./Trapezoid-BX_hmeZJ.js";
|
|
99
|
+
import "./Tritone-BlJ7cchN.js";
|
|
100
|
+
import "./Truchet-Bnn0fwbF.js";
|
|
101
|
+
import "./Twirl-C5ijhqz1.js";
|
|
102
|
+
import "./Vesica-DU0f85NG.js";
|
|
103
|
+
import "./Vibrance-dqIV6GBe.js";
|
|
104
|
+
import "./browser-ClWxLlIB.js";
|
|
105
|
+
import "./VideoTexture-DJrkry82.js";
|
|
106
|
+
import "./Vignette-DB1wO1dm.js";
|
|
107
|
+
import "./Voronoi-C3WIJFWc.js";
|
|
108
|
+
import "./WaveDistortion-BKma8-Ju.js";
|
|
109
|
+
import "./Weave-xuu_vQ5e.js";
|
|
110
|
+
import "./WebcamTexture-Cf8J7JB1.js";
|
|
111
|
+
import "./ZoomBlur-UcS2iFT2.js";
|
|
112
|
+
import { t as getAllShaders } from "./shaderRegistry-B_84rvO8.js";
|
|
112
113
|
import { Material, Mesh, MeshBasicNodeMaterial, OrthographicCamera, PlaneGeometry, SRGBColorSpace, Scene, Vector2, WebGPURenderer } from "three/webgpu";
|
|
113
114
|
import { WebGLRenderer } from "three";
|
|
114
115
|
import { PI, abs, add, atan, clamp, convertToTexture, cos, div, dot, float, fract, max, min, mix, mul, pow, screenUV, sign, sin, smoothstep, sqrt, step, sub, time, uniform, uv, vec2, vec3, vec4 } from "three/tsl";
|
|
@@ -809,6 +810,15 @@ function shaderRenderer() {
|
|
|
809
810
|
}
|
|
810
811
|
});
|
|
811
812
|
});
|
|
813
|
+
let hasComputeNodes = false;
|
|
814
|
+
for (const ni of nodeRegistry.nodes.values()) if (ni.computeGetNodes) {
|
|
815
|
+
hasComputeNodes = true;
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
if (hasComputeNodes && materialUpdateBatchRAF === null) materialUpdateBatchRAF = requestAnimationFrame(() => {
|
|
819
|
+
materialUpdateBatchRAF = null;
|
|
820
|
+
updateMaterial();
|
|
821
|
+
});
|
|
812
822
|
lastRenderTime = 0;
|
|
813
823
|
renderFrame();
|
|
814
824
|
});
|
|
@@ -956,7 +966,8 @@ function shaderRenderer() {
|
|
|
956
966
|
}
|
|
957
967
|
const newProcessedMasks = new Set(processedMasks);
|
|
958
968
|
newProcessedMasks.add(currentNodeId);
|
|
959
|
-
const
|
|
969
|
+
const mapTexture = trackConvertToTexture(composeNodeTree(sourceNodeId, newProcessedMasks));
|
|
970
|
+
const sampled = mapTexture.sample(sampleUV ?? screenUV);
|
|
960
971
|
let raw;
|
|
961
972
|
switch (mapConfig.channel) {
|
|
962
973
|
case "alpha":
|
|
@@ -981,7 +992,9 @@ function shaderRenderer() {
|
|
|
981
992
|
inputMax: uniform(mapConfig.inputMax),
|
|
982
993
|
outputMin: uniform(mapConfig.outputMin),
|
|
983
994
|
outputMax: uniform(mapConfig.outputMax),
|
|
984
|
-
curve: uniform(mapConfig.curve ?? 0)
|
|
995
|
+
curve: uniform(mapConfig.curve ?? 0),
|
|
996
|
+
sourceTexture: mapTexture,
|
|
997
|
+
channel: mapConfig.channel
|
|
985
998
|
};
|
|
986
999
|
else {
|
|
987
1000
|
nodeInfo.mapUniforms[propName].inputMin.value = mapConfig.inputMin;
|
|
@@ -989,6 +1002,8 @@ function shaderRenderer() {
|
|
|
989
1002
|
nodeInfo.mapUniforms[propName].outputMin.value = mapConfig.outputMin;
|
|
990
1003
|
nodeInfo.mapUniforms[propName].outputMax.value = mapConfig.outputMax;
|
|
991
1004
|
nodeInfo.mapUniforms[propName].curve.value = mapConfig.curve ?? 0;
|
|
1005
|
+
nodeInfo.mapUniforms[propName].sourceTexture = mapTexture;
|
|
1006
|
+
nodeInfo.mapUniforms[propName].channel = mapConfig.channel;
|
|
992
1007
|
}
|
|
993
1008
|
const { inputMin: inputMinU, inputMax: inputMaxU, outputMin: outputMinU, outputMax: outputMaxU, curve: curveU } = nodeInfo.mapUniforms[propName];
|
|
994
1009
|
const inputRange = max(inputMaxU.sub(inputMinU), 1e-4);
|
|
@@ -1056,7 +1071,8 @@ function shaderRenderer() {
|
|
|
1056
1071
|
const buildEffectiveUniforms = (baseUniforms, maps, nodeId, processedMasks) => {
|
|
1057
1072
|
if (!maps || Object.keys(maps).length === 0) return baseUniforms;
|
|
1058
1073
|
const effectiveUniforms = { ...baseUniforms };
|
|
1059
|
-
const
|
|
1074
|
+
const nodeInfo = nodeRegistry.nodes.get(nodeId);
|
|
1075
|
+
const customSampleUVs = nodeInfo?.mapSampleUVsFunc?.(baseUniforms) ?? {};
|
|
1060
1076
|
for (const [propName, driverConfig] of Object.entries(maps)) {
|
|
1061
1077
|
let resolvedNode = null;
|
|
1062
1078
|
if (driverConfig.type === "map") {
|
|
@@ -1076,10 +1092,38 @@ function shaderRenderer() {
|
|
|
1076
1092
|
if (!(propName in effectiveUniforms)) continue;
|
|
1077
1093
|
resolvedNode = resolveAutoAnimateForProp(driverConfig, nodeId, propName);
|
|
1078
1094
|
}
|
|
1079
|
-
if (resolvedNode !== null && propName in effectiveUniforms)
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1095
|
+
if (resolvedNode !== null && propName in effectiveUniforms) {
|
|
1096
|
+
let mapComputeInfo = void 0;
|
|
1097
|
+
if (driverConfig.type === "map") {
|
|
1098
|
+
const mu = nodeInfo?.mapUniforms?.[propName];
|
|
1099
|
+
if (mu?.sourceTexture && mu?.channel) mapComputeInfo = {
|
|
1100
|
+
sourceTexture: mu.sourceTexture,
|
|
1101
|
+
channel: mu.channel,
|
|
1102
|
+
inputMin: mu.inputMin,
|
|
1103
|
+
inputMax: mu.inputMax,
|
|
1104
|
+
outputMin: mu.outputMin,
|
|
1105
|
+
outputMax: mu.outputMax,
|
|
1106
|
+
curve: mu.curve
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
let getCpuValue = void 0;
|
|
1110
|
+
if (driverConfig.type === "mouse") getCpuValue = () => {
|
|
1111
|
+
const state = nodeInfo?.mouseDriverState?.[propName];
|
|
1112
|
+
const mu = nodeInfo?.mapUniforms?.[propName];
|
|
1113
|
+
if (!state || !mu) return 0;
|
|
1114
|
+
const smooth = state.smoothedUniform.value;
|
|
1115
|
+
const oMin = mu.outputMin.value;
|
|
1116
|
+
const oMax = mu.outputMax.value;
|
|
1117
|
+
const exp$1 = Math.pow(2, -(mu.curve.value * 2));
|
|
1118
|
+
return oMin + (oMax - oMin) * Math.pow(smooth, exp$1);
|
|
1119
|
+
};
|
|
1120
|
+
effectiveUniforms[propName] = {
|
|
1121
|
+
...effectiveUniforms[propName],
|
|
1122
|
+
uniform: resolvedNode,
|
|
1123
|
+
...mapComputeInfo ? { mapComputeInfo } : {},
|
|
1124
|
+
...getCpuValue ? { getCpuValue } : {}
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1083
1127
|
}
|
|
1084
1128
|
return effectiveUniforms;
|
|
1085
1129
|
};
|
|
@@ -1089,6 +1133,20 @@ function shaderRenderer() {
|
|
|
1089
1133
|
const transformedUV = applyUVTransform(screenUV, nodeInfo.transformUniforms.offsetX, nodeInfo.transformUniforms.offsetY, nodeInfo.transformUniforms.rotation, nodeInfo.transformUniforms.scale, nodeInfo.transformUniforms.anchorX, nodeInfo.transformUniforms.anchorY, nodeInfo.transformUniforms.aspectRatio);
|
|
1090
1134
|
return applyEdgeHandling(transformedUV, texture$1.sample(transformedUV), texture$1, nodeInfo.transformUniforms.edges.value);
|
|
1091
1135
|
};
|
|
1136
|
+
const initNodeCompute = (nodeInfo, params) => {
|
|
1137
|
+
nodeInfo.computeOutputs = void 0;
|
|
1138
|
+
nodeInfo.computeGetNodes = void 0;
|
|
1139
|
+
if (nodeInfo.computeNodeFunc && renderer.backend?.isWebGPUBackend === true) try {
|
|
1140
|
+
const result = nodeInfo.computeNodeFunc(params);
|
|
1141
|
+
if (result) {
|
|
1142
|
+
nodeInfo.computeOutputs = result.outputs;
|
|
1143
|
+
nodeInfo.computeGetNodes = result.getComputeNodes;
|
|
1144
|
+
return result.outputs;
|
|
1145
|
+
}
|
|
1146
|
+
} catch (e) {
|
|
1147
|
+
console.error(`Error initializing compute for node ${nodeInfo.id}:`, e);
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1092
1150
|
const composeNodeTree = (nodeId, processedMasks = /* @__PURE__ */ new Set(), currentlyComposedNodes) => {
|
|
1093
1151
|
if (currentWidth === 0 || currentHeight === 0) return vec4(0, 0, 0, 0);
|
|
1094
1152
|
const nodeInfo = nodeRegistry.nodes.get(nodeId);
|
|
@@ -1118,9 +1176,8 @@ function shaderRenderer() {
|
|
|
1118
1176
|
nodeInfo.beforeRenderCallbacks = [];
|
|
1119
1177
|
nodeInfo.afterRenderCallbacks = [];
|
|
1120
1178
|
nodeInfo.resizeCallbacks = [];
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1123
|
-
uniforms: effectiveUniforms0,
|
|
1179
|
+
const baseParams0 = {
|
|
1180
|
+
uniforms: buildEffectiveUniforms(nodeInfo.uniforms ?? {}, nodeInfo.metadata.maps, nodeId, processedMasks),
|
|
1124
1181
|
childNode: void 0,
|
|
1125
1182
|
onCleanup: nodeSpecificOnCleanup,
|
|
1126
1183
|
onBeforeRender: nodeSpecificOnBeforeRender,
|
|
@@ -1133,7 +1190,9 @@ function shaderRenderer() {
|
|
|
1133
1190
|
},
|
|
1134
1191
|
renderer,
|
|
1135
1192
|
domCanvas: nodeInfo.domCanvas
|
|
1136
|
-
}
|
|
1193
|
+
};
|
|
1194
|
+
baseParams0.computeOutputs = initNodeCompute(nodeInfo, baseParams0);
|
|
1195
|
+
return applyMaskIfNeeded(applyNodeTransformation(nodeInfo.fragmentNodeFunc(baseParams0), nodeInfo), nodeInfo, nodeId, processedMasks);
|
|
1137
1196
|
} else {
|
|
1138
1197
|
const sortedChildren = [...childNodes].sort((a, b) => a.metadata.renderOrder - b.metadata.renderOrder);
|
|
1139
1198
|
if (nodeInfo.parentId === null) {
|
|
@@ -1179,9 +1238,8 @@ function shaderRenderer() {
|
|
|
1179
1238
|
childInfo.beforeRenderCallbacks = [];
|
|
1180
1239
|
childInfo.afterRenderCallbacks = [];
|
|
1181
1240
|
childInfo.resizeCallbacks = [];
|
|
1182
|
-
const
|
|
1183
|
-
|
|
1184
|
-
uniforms: effectiveUniforms1,
|
|
1241
|
+
const baseParams1 = {
|
|
1242
|
+
uniforms: buildEffectiveUniforms(childInfo.uniforms ?? {}, childInfo.metadata.maps, childInfo.id, processedMasks),
|
|
1185
1243
|
childNode: effectiveChildNode,
|
|
1186
1244
|
onCleanup: childSpecificOnCleanup,
|
|
1187
1245
|
onBeforeRender: childSpecificOnBeforeRender,
|
|
@@ -1194,7 +1252,9 @@ function shaderRenderer() {
|
|
|
1194
1252
|
},
|
|
1195
1253
|
renderer,
|
|
1196
1254
|
domCanvas: childInfo.domCanvas
|
|
1197
|
-
}
|
|
1255
|
+
};
|
|
1256
|
+
baseParams1.computeOutputs = initNodeCompute(childInfo, baseParams1);
|
|
1257
|
+
childResult = applyMaskIfNeeded(applyNodeTransformation(childInfo.fragmentNodeFunc(baseParams1), childInfo), childInfo, childInfo.id, processedMasks);
|
|
1198
1258
|
}
|
|
1199
1259
|
if (childInfo.requiresChild && childInfo.metadata.blendMode === "normal" && !childHasChildren) composedChildren = mix(composedChildren || vec4(0, 0, 0, 0), childResult, childInfo.opacityUniform);
|
|
1200
1260
|
else if (composedChildren === void 0) if (nodeInfo.requiresRTT || effectiveOpacity !== 1) composedChildren = applyBlendMode(vec4(1, 1, 1, 0), childResult, childInfo.metadata.blendMode, childInfo.opacityUniform);
|
|
@@ -1212,9 +1272,8 @@ function shaderRenderer() {
|
|
|
1212
1272
|
nodeInfo.beforeRenderCallbacks = [];
|
|
1213
1273
|
nodeInfo.afterRenderCallbacks = [];
|
|
1214
1274
|
nodeInfo.resizeCallbacks = [];
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
uniforms: effectiveUniforms2,
|
|
1275
|
+
const baseParams2 = {
|
|
1276
|
+
uniforms: buildEffectiveUniforms(nodeInfo.uniforms ?? {}, nodeInfo.metadata.maps, nodeId, processedMasks),
|
|
1218
1277
|
childNode: composedChildren,
|
|
1219
1278
|
onCleanup: nodeSpecificOnCleanup,
|
|
1220
1279
|
onBeforeRender: nodeSpecificOnBeforeRender,
|
|
@@ -1227,7 +1286,9 @@ function shaderRenderer() {
|
|
|
1227
1286
|
},
|
|
1228
1287
|
renderer,
|
|
1229
1288
|
domCanvas: nodeInfo.domCanvas
|
|
1230
|
-
}
|
|
1289
|
+
};
|
|
1290
|
+
baseParams2.computeOutputs = initNodeCompute(nodeInfo, baseParams2);
|
|
1291
|
+
return applyMaskIfNeeded(applyNodeTransformation(nodeInfo.fragmentNodeFunc(baseParams2), nodeInfo), nodeInfo, nodeId, processedMasks);
|
|
1231
1292
|
} else {
|
|
1232
1293
|
let composedChildrenResult = void 0;
|
|
1233
1294
|
for (let i = 0; i < sortedChildren.length; i++) {
|
|
@@ -1264,9 +1325,8 @@ function shaderRenderer() {
|
|
|
1264
1325
|
childInfo.beforeRenderCallbacks = [];
|
|
1265
1326
|
childInfo.afterRenderCallbacks = [];
|
|
1266
1327
|
childInfo.resizeCallbacks = [];
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
uniforms: effectiveUniforms3,
|
|
1328
|
+
const baseParams3 = {
|
|
1329
|
+
uniforms: buildEffectiveUniforms(childInfo.uniforms ?? {}, childInfo.metadata.maps, childInfo.id, processedMasks),
|
|
1270
1330
|
childNode: effectiveChildNode,
|
|
1271
1331
|
onCleanup: childSpecificOnCleanup,
|
|
1272
1332
|
onBeforeRender: childSpecificOnBeforeRender,
|
|
@@ -1279,7 +1339,9 @@ function shaderRenderer() {
|
|
|
1279
1339
|
},
|
|
1280
1340
|
renderer,
|
|
1281
1341
|
domCanvas: childInfo.domCanvas
|
|
1282
|
-
}
|
|
1342
|
+
};
|
|
1343
|
+
baseParams3.computeOutputs = initNodeCompute(childInfo, baseParams3);
|
|
1344
|
+
childResult = applyMaskIfNeeded(applyNodeTransformation(childInfo.fragmentNodeFunc(baseParams3), childInfo), childInfo, childInfo.id, processedMasks);
|
|
1283
1345
|
}
|
|
1284
1346
|
if (childInfo.requiresChild && childInfo.metadata.blendMode === "normal" && !childHasChildren) composedChildrenResult = mix(composedChildrenResult || vec4(0, 0, 0, 0), childResult, childInfo.opacityUniform);
|
|
1285
1347
|
else if (composedChildrenResult === void 0) if (nodeInfo.requiresRTT || effectiveOpacity !== 1) composedChildrenResult = applyBlendMode(vec4(1, 1, 1, 0), childResult, childInfo.metadata.blendMode, childInfo.opacityUniform);
|
|
@@ -1297,9 +1359,8 @@ function shaderRenderer() {
|
|
|
1297
1359
|
nodeInfo.beforeRenderCallbacks = [];
|
|
1298
1360
|
nodeInfo.afterRenderCallbacks = [];
|
|
1299
1361
|
nodeInfo.resizeCallbacks = [];
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1302
|
-
uniforms: effectiveUniforms4,
|
|
1362
|
+
const baseParams4 = {
|
|
1363
|
+
uniforms: buildEffectiveUniforms(nodeInfo.uniforms ?? {}, nodeInfo.metadata.maps, nodeId, processedMasks),
|
|
1303
1364
|
childNode: composedChildrenResult,
|
|
1304
1365
|
onCleanup: nodeSpecificOnCleanup,
|
|
1305
1366
|
onBeforeRender: nodeSpecificOnBeforeRender,
|
|
@@ -1312,7 +1373,9 @@ function shaderRenderer() {
|
|
|
1312
1373
|
},
|
|
1313
1374
|
renderer,
|
|
1314
1375
|
domCanvas: nodeInfo.domCanvas
|
|
1315
|
-
}
|
|
1376
|
+
};
|
|
1377
|
+
baseParams4.computeOutputs = initNodeCompute(nodeInfo, baseParams4);
|
|
1378
|
+
return applyMaskIfNeeded(applyNodeTransformation(nodeInfo.fragmentNodeFunc(baseParams4), nodeInfo), nodeInfo, nodeId, processedMasks);
|
|
1316
1379
|
}
|
|
1317
1380
|
}
|
|
1318
1381
|
};
|
|
@@ -1402,6 +1465,7 @@ function shaderRenderer() {
|
|
|
1402
1465
|
transformUniforms,
|
|
1403
1466
|
transformRTTActive: false,
|
|
1404
1467
|
mapSampleUVsFunc: componentDefinition?.mapSampleUVs,
|
|
1468
|
+
computeNodeFunc: componentDefinition?.computeNode,
|
|
1405
1469
|
domCanvas
|
|
1406
1470
|
};
|
|
1407
1471
|
nodeRegistry.nodes.set(id, nodeInfo);
|
|
@@ -1735,6 +1799,26 @@ function shaderRenderer() {
|
|
|
1735
1799
|
}
|
|
1736
1800
|
}
|
|
1737
1801
|
};
|
|
1802
|
+
const executeComputeDispatches = (deltaTime) => {
|
|
1803
|
+
const params = {
|
|
1804
|
+
deltaTime,
|
|
1805
|
+
pointer: {
|
|
1806
|
+
x: pointerX,
|
|
1807
|
+
y: pointerY
|
|
1808
|
+
},
|
|
1809
|
+
pointerActive,
|
|
1810
|
+
dimensions: {
|
|
1811
|
+
width: currentWidth,
|
|
1812
|
+
height: currentHeight
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1815
|
+
for (const nodeInfo of nodeRegistry.nodes.values()) if (nodeInfo.computeGetNodes) try {
|
|
1816
|
+
const nodes = nodeInfo.computeGetNodes(params);
|
|
1817
|
+
if (nodes) for (const node of nodes) renderer.compute(node);
|
|
1818
|
+
} catch (e) {
|
|
1819
|
+
console.error(`Error dispatching compute for node ${nodeInfo.id}:`, e);
|
|
1820
|
+
}
|
|
1821
|
+
};
|
|
1738
1822
|
const executeBeforeRenderCallbacks = (deltaTime) => {
|
|
1739
1823
|
const params = {
|
|
1740
1824
|
deltaTime,
|
|
@@ -1804,6 +1888,7 @@ function shaderRenderer() {
|
|
|
1804
1888
|
lastRenderTime = currentTime;
|
|
1805
1889
|
if (enablePerformanceTracking) performance.mark("shader-cpu-start");
|
|
1806
1890
|
updateMouseDrivers(cappedDeltaTime);
|
|
1891
|
+
executeComputeDispatches(cappedDeltaTime);
|
|
1807
1892
|
executeBeforeRenderCallbacks(cappedDeltaTime);
|
|
1808
1893
|
try {
|
|
1809
1894
|
if (isUpdatingMaterial) return;
|