shaders 2.2.43 → 2.2.45
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/{AngularBlur-CuwAjUOA.js → AngularBlur-CQYutWxj.js} +6 -2
- package/dist/core/{Beam-CbG4MkLo.js → Beam-CZo-XeQ-.js} +4 -4
- package/dist/core/{Blob-Ck1tVOL_.js → Blob-D3PIrwWv.js} +7 -7
- package/dist/core/{BrightnessContrast-CaErceqR.js → BrightnessContrast-SC7HYw9z.js} +2 -2
- package/dist/core/{Bulge-BVcWo6On.js → Bulge-CbZA25NX.js} +3 -3
- package/dist/core/{CRTScreen-CcAYeqoI.js → CRTScreen-DV5Y2GRA.js} +34 -6
- package/dist/core/{Checkerboard-D_hGvoO7.js → Checkerboard-DBcVaYQv.js} +6 -9
- package/dist/core/{ChromaFlow-DizYQSgf.js → ChromaFlow-DcqnZ1wf.js} +5 -4
- package/dist/core/{ChromaticAberration-Bk_DMYJm.js → ChromaticAberration-Dgf83J6w.js} +4 -3
- package/dist/core/{Circle-BlVzkeyl.js → Circle-BWd84W7f.js} +2 -2
- package/dist/core/{CursorTrail-CxXWV7KH.js → CursorTrail-BKfdORYc.js} +5 -4
- package/dist/core/{Dither-C1KyBYuE.js → Dither-DWoCLL0e.js} +1 -1
- package/dist/core/{DotGrid-ll8XCA0p.js → DotGrid-BZVfqUZO.js} +2 -2
- package/dist/core/{Duotone-d2gQJr4M.js → Duotone-sjvdZBlx.js} +1 -1
- package/dist/core/{FilmGrain-3h6TIe1T.js → FilmGrain-Cr3qP38A.js} +1 -1
- package/dist/core/{FloatingParticles-D95-rj4h.js → FloatingParticles-CPsVFZJl.js} +5 -5
- package/dist/core/{GlassTiles-DqT67iqr.js → GlassTiles-C6LLjlnB.js} +9 -7
- package/dist/core/{Glow-BYNKuw0E.js → Glow-C2avDr73.js} +3 -3
- package/dist/core/{Godrays-DCk1c8sQ.js → Godrays-RVh5ylQ-.js} +8 -6
- package/dist/core/{GridDistortion-D-iiGELF.js → GridDistortion-fimECOse.js} +12 -23
- package/dist/core/{Halftone-CV0aFuRG.js → Halftone-Cb5yrPnj.js} +1 -1
- package/dist/core/{LinearBlur-CTXjolzL.js → LinearBlur-CfMT259a.js} +2 -1
- package/dist/core/{LinearGradient-CZo6e7r8.js → LinearGradient-Cn7w-umQ.js} +6 -2
- package/dist/core/{Liquify-BbfDBMNZ.js → Liquify-BCkIt0A1.js} +1 -18
- package/dist/core/{Perspective-CSP2Hb16.js → Perspective-CJOFHxEC.js} +1 -1
- package/dist/core/{Pixelate-BAoi-CSx.js → Pixelate-BhNAxBsT.js} +7 -3
- package/dist/core/{PolarCoordinates-BwN9HhFK.js → PolarCoordinates-DLs3K__1.js} +3 -3
- package/dist/core/{ProgressiveBlur-RuAm_BKx.js → ProgressiveBlur-BIZSnUjp.js} +5 -2
- package/dist/core/{RadialGradient-BfFuRbIl.js → RadialGradient-sQgXXXQk.js} +1 -1
- package/dist/core/{RectangularCoordinates-CiW3J4UT.js → RectangularCoordinates-CyarkXn0.js} +2 -2
- package/dist/core/{Ripples-DKBIp3Qq.js → Ripples-Djjw66Bn.js} +3 -3
- package/dist/core/{Saturation-DVVlpikK.js → Saturation-DLHW_GP6.js} +1 -1
- package/dist/core/{Sharpness-cw57bW0s.js → Sharpness-DkGuV_dy.js} +1 -1
- package/dist/core/{Shatter-COjV2jLy.js → Shatter-DVgj2Ea3.js} +3 -2
- package/dist/core/{SimplexNoise-Ce79jgYM.js → SimplexNoise-BXtLTcAr.js} +1 -1
- package/dist/core/{SineWave-Cv2gOU8a.js → SineWave-BxqFasFh.js} +3 -3
- package/dist/core/{Spherize-R-s4pX9t.js → Spherize-DIJ4c_EG.js} +4 -4
- package/dist/core/{Spiral-W4dALX1z.js → Spiral-BBtmU1Fv.js} +3 -3
- package/dist/core/{Strands-DtN5POfO.js → Strands-D6UOhX0L.js} +5 -5
- package/dist/core/{Stretch-BzvP_hdu.js → Stretch-DLpz8Ofm.js} +2 -2
- package/dist/core/{Stripes-BbNFX05u.js → Stripes-Bre3Z2m_.js} +5 -5
- package/dist/core/{TiltShift-B6gbm7Z8.js → TiltShift-BPpXBzBg.js} +6 -4
- package/dist/core/{Tint-CpnitsHw.js → Tint-BazvezVn.js} +1 -1
- package/dist/core/{Tritone-DzvSKVfR.js → Tritone-w0h2ebDB.js} +1 -1
- package/dist/core/{Twirl-BXH4uAd6.js → Twirl-dmfYS2Eo.js} +7 -5
- package/dist/core/{Vibrance-ByN9bRgU.js → Vibrance-BpWyAK9W.js} +1 -1
- package/dist/core/{WaveDistortion-BA1PyqYH.js → WaveDistortion-hWdvaZmT.js} +6 -4
- package/dist/core/{ZoomBlur-CIkkDBIo.js → ZoomBlur-DCI4uHOL.js} +5 -2
- package/dist/core/index.d.ts +0 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -170
- package/dist/core/registry.d.ts +10 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +166 -0
- package/dist/core/shaders/AngularBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/AngularBlur/index.js +1 -1
- package/dist/core/shaders/Beam/index.js +1 -1
- package/dist/core/shaders/Blob/index.js +1 -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.d.ts +14 -0
- package/dist/core/shaders/CRTScreen/index.d.ts.map +1 -1
- package/dist/core/shaders/CRTScreen/index.js +1 -1
- package/dist/core/shaders/Checkerboard/index.d.ts.map +1 -1
- package/dist/core/shaders/Checkerboard/index.js +1 -1
- package/dist/core/shaders/ChromaFlow/index.d.ts +1 -1
- package/dist/core/shaders/ChromaFlow/index.d.ts.map +1 -1
- package/dist/core/shaders/ChromaFlow/index.js +1 -1
- package/dist/core/shaders/ChromaticAberration/index.d.ts.map +1 -1
- package/dist/core/shaders/ChromaticAberration/index.js +1 -1
- package/dist/core/shaders/Circle/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/Dither/index.js +1 -1
- package/dist/core/shaders/DotGrid/index.js +1 -1
- package/dist/core/shaders/Duotone/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/GlassTiles/index.d.ts +1 -1
- package/dist/core/shaders/GlassTiles/index.d.ts.map +1 -1
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glow/index.js +1 -1
- package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.d.ts +0 -7
- package/dist/core/shaders/GridDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/LinearBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.d.ts.map +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.d.ts +0 -7
- package/dist/core/shaders/Liquify/index.d.ts.map +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Perspective/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.d.ts +1 -1
- package/dist/core/shaders/Pixelate/index.d.ts.map +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ripples/index.js +1 -1
- 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/Spherize/index.js +1 -1
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Strands/index.d.ts +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Stripes/index.d.ts +1 -1
- package/dist/core/shaders/Stripes/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.d.ts.map +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tint/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Twirl/index.d.ts.map +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +1 -1
- package/dist/core/shaders/WaveDistortion/index.d.ts.map +1 -1
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.d.ts.map +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/react/AngularBlur.js +144 -0
- package/dist/react/Ascii.js +144 -0
- package/dist/react/Beam.js +144 -0
- package/dist/react/Blob.js +144 -0
- package/dist/react/Blur.js +144 -0
- package/dist/react/BrightnessContrast.js +144 -0
- package/dist/react/Bulge.js +144 -0
- package/dist/react/CRTScreen.js +144 -0
- package/dist/react/ChannelBlur.js +144 -0
- package/dist/react/Checkerboard.js +144 -0
- package/dist/react/ChromaFlow.js +144 -0
- package/dist/react/ChromaticAberration.js +144 -0
- package/dist/react/Circle.js +144 -0
- package/dist/react/CursorTrail.js +144 -0
- package/dist/react/DiffuseBlur.js +144 -0
- package/dist/react/Dither.js +144 -0
- package/dist/react/DotGrid.js +144 -0
- package/dist/react/Duotone.js +144 -0
- package/dist/react/FilmGrain.js +144 -0
- package/dist/react/FloatingParticles.js +144 -0
- package/dist/react/GlassTiles.js +144 -0
- package/dist/react/Glow.js +144 -0
- package/dist/react/Godrays.js +144 -0
- package/dist/react/Grayscale.js +144 -0
- package/dist/react/Grid.js +144 -0
- package/dist/react/GridDistortion.js +144 -0
- package/dist/react/Group.js +144 -0
- package/dist/react/Halftone.js +144 -0
- package/dist/react/HueShift.js +144 -0
- package/dist/react/ImageTexture.js +144 -0
- package/dist/react/Invert.js +144 -0
- package/dist/react/LinearBlur.js +144 -0
- package/dist/react/LinearGradient.js +144 -0
- package/dist/react/Liquify.js +144 -0
- package/dist/react/Perspective.js +144 -0
- package/dist/react/Pixelate.js +144 -0
- package/dist/react/PolarCoordinates.js +144 -0
- package/dist/react/Posterize.js +144 -0
- package/dist/react/ProgressiveBlur.js +144 -0
- package/dist/react/RadialGradient.js +144 -0
- package/dist/react/RectangularCoordinates.js +144 -0
- package/dist/react/Ripples.js +144 -0
- package/dist/react/Saturation.js +144 -0
- package/dist/react/Shader.js +166 -0
- package/dist/react/Sharpness.js +144 -0
- package/dist/react/Shatter.js +144 -0
- package/dist/react/SimplexNoise.js +144 -0
- package/dist/react/SineWave.js +144 -0
- package/dist/react/SolidColor.js +144 -0
- package/dist/react/Spherize.js +144 -0
- package/dist/react/Spiral.js +144 -0
- package/dist/react/Strands.js +144 -0
- package/dist/react/Stretch.js +144 -0
- package/dist/react/Stripes.js +144 -0
- package/dist/react/Swirl.js +144 -0
- package/dist/react/TiltShift.js +144 -0
- package/dist/react/Tint.js +144 -0
- package/dist/react/Tritone.js +144 -0
- package/dist/react/Twirl.js +144 -0
- package/dist/react/Vibrance.js +144 -0
- package/dist/react/WaveDistortion.js +144 -0
- package/dist/react/WebcamTexture.js +144 -0
- package/dist/react/ZoomBlur.js +144 -0
- package/dist/react/index.js +64 -8784
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +392 -1
- package/dist/registry.js +228 -228
- package/dist/solid/components/AngularBlur.js +148 -0
- package/dist/solid/components/Ascii.js +148 -0
- package/dist/solid/components/Beam.js +148 -0
- package/dist/solid/components/Blob.js +148 -0
- package/dist/solid/components/Blur.js +148 -0
- package/dist/solid/components/BrightnessContrast.js +148 -0
- package/dist/solid/components/Bulge.js +148 -0
- package/dist/solid/components/CRTScreen.js +148 -0
- package/dist/solid/components/ChannelBlur.js +148 -0
- package/dist/solid/components/Checkerboard.js +148 -0
- package/dist/solid/components/ChromaFlow.js +148 -0
- package/dist/solid/components/ChromaticAberration.js +148 -0
- package/dist/solid/components/Circle.js +148 -0
- package/dist/solid/components/CursorTrail.js +148 -0
- package/dist/solid/components/DiffuseBlur.js +148 -0
- package/dist/solid/components/Dither.js +148 -0
- package/dist/solid/components/DotGrid.js +148 -0
- package/dist/solid/components/Duotone.js +148 -0
- package/dist/solid/components/FilmGrain.js +148 -0
- package/dist/solid/components/FloatingParticles.js +148 -0
- package/dist/solid/components/GlassTiles.js +148 -0
- package/dist/solid/components/Glow.js +148 -0
- package/dist/solid/components/Godrays.js +148 -0
- package/dist/solid/components/Grayscale.js +148 -0
- package/dist/solid/components/Grid.js +148 -0
- package/dist/solid/components/GridDistortion.js +148 -0
- package/dist/solid/components/Group.js +148 -0
- package/dist/solid/components/Halftone.js +148 -0
- package/dist/solid/components/HueShift.js +148 -0
- package/dist/solid/components/ImageTexture.js +148 -0
- package/dist/solid/components/Invert.js +148 -0
- package/dist/solid/components/LinearBlur.js +148 -0
- package/dist/solid/components/LinearGradient.js +148 -0
- package/dist/solid/components/Liquify.js +148 -0
- package/dist/solid/components/Perspective.js +148 -0
- package/dist/solid/components/Pixelate.js +148 -0
- package/dist/solid/components/PolarCoordinates.js +148 -0
- package/dist/solid/components/Posterize.js +148 -0
- package/dist/solid/components/ProgressiveBlur.js +148 -0
- package/dist/solid/components/RadialGradient.js +148 -0
- package/dist/solid/components/RectangularCoordinates.js +148 -0
- package/dist/solid/components/Ripples.js +148 -0
- package/dist/solid/components/Saturation.js +148 -0
- package/dist/solid/components/Sharpness.js +148 -0
- package/dist/solid/components/Shatter.js +148 -0
- package/dist/solid/components/SimplexNoise.js +148 -0
- package/dist/solid/components/SineWave.js +148 -0
- package/dist/solid/components/SolidColor.js +148 -0
- package/dist/solid/components/Spherize.js +148 -0
- package/dist/solid/components/Spiral.js +148 -0
- package/dist/solid/components/Strands.js +148 -0
- package/dist/solid/components/Stretch.js +148 -0
- package/dist/solid/components/Stripes.js +148 -0
- package/dist/solid/components/Swirl.js +148 -0
- package/dist/solid/components/TiltShift.js +148 -0
- package/dist/solid/components/Tint.js +148 -0
- package/dist/solid/components/Tritone.js +148 -0
- package/dist/solid/components/Twirl.js +148 -0
- package/dist/solid/components/Vibrance.js +148 -0
- package/dist/solid/components/WaveDistortion.js +148 -0
- package/dist/solid/components/WebcamTexture.js +148 -0
- package/dist/solid/components/ZoomBlur.js +148 -0
- package/dist/solid/engine/Shader.js +189 -0
- package/dist/solid/index.js +126 -8989
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +62 -417
- package/dist/svelte/generatePresetCode-CtXcoyI0.js +393 -0
- package/dist/svelte/index.js +1 -1
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/AngularBlur.js +3 -0
- package/dist/vue/AngularBlur.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/Ascii.js +3 -0
- package/dist/vue/Ascii.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Beam.js +3 -0
- package/dist/vue/Beam.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/vue/Blob.js +3 -0
- package/dist/vue/Blob.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/vue/Blur.js +3 -0
- package/dist/vue/Blur.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/BrightnessContrast.js +3 -0
- package/dist/vue/BrightnessContrast.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/Bulge.js +3 -0
- package/dist/vue/Bulge.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/CRTScreen.js +3 -0
- package/dist/vue/CRTScreen.vue_vue_type_script_setup_true_lang.js +131 -0
- package/dist/vue/ChannelBlur.js +3 -0
- package/dist/vue/ChannelBlur.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/Checkerboard.js +3 -0
- package/dist/vue/Checkerboard.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/ChromaFlow.js +3 -0
- package/dist/vue/ChromaFlow.vue_vue_type_script_setup_true_lang.js +131 -0
- package/dist/vue/ChromaticAberration.js +3 -0
- package/dist/vue/ChromaticAberration.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Circle.js +3 -0
- package/dist/vue/Circle.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/CursorTrail.js +3 -0
- package/dist/vue/CursorTrail.vue_vue_type_script_setup_true_lang.js +129 -0
- package/dist/vue/DiffuseBlur.js +3 -0
- package/dist/vue/DiffuseBlur.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/Dither.js +3 -0
- package/dist/vue/Dither.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/DotGrid.js +3 -0
- package/dist/vue/DotGrid.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Duotone.js +3 -0
- package/dist/vue/Duotone.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/FilmGrain.js +3 -0
- package/dist/vue/FilmGrain.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/FloatingParticles.js +3 -0
- package/dist/vue/FloatingParticles.vue_vue_type_script_setup_true_lang.js +134 -0
- package/dist/vue/GlassTiles.js +3 -0
- package/dist/vue/GlassTiles.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Glow.js +3 -0
- package/dist/vue/Glow.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/Godrays.js +3 -0
- package/dist/vue/Godrays.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/vue/Grayscale.js +3 -0
- package/dist/vue/Grayscale.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/vue/Grid.js +3 -0
- package/dist/vue/Grid.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/GridDistortion.js +3 -0
- package/dist/vue/GridDistortion.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Group.js +3 -0
- package/dist/vue/Group.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/vue/Halftone.js +3 -0
- package/dist/vue/Halftone.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/HueShift.js +3 -0
- package/dist/vue/HueShift.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/ImageTexture.js +3 -0
- package/dist/vue/ImageTexture.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/Invert.js +3 -0
- package/dist/vue/Invert.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/vue/LinearBlur.js +3 -0
- package/dist/vue/LinearBlur.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/LinearGradient.js +3 -0
- package/dist/vue/LinearGradient.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/vue/Liquify.js +3 -0
- package/dist/vue/Liquify.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Perspective.js +3 -0
- package/dist/vue/Perspective.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/vue/Pixelate.js +3 -0
- package/dist/vue/Pixelate.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/PolarCoordinates.js +3 -0
- package/dist/vue/PolarCoordinates.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Posterize.js +3 -0
- package/dist/vue/Posterize.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/ProgressiveBlur.js +3 -0
- package/dist/vue/ProgressiveBlur.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/RadialGradient.js +3 -0
- package/dist/vue/RadialGradient.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/RectangularCoordinates.js +3 -0
- package/dist/vue/RectangularCoordinates.vue_vue_type_script_setup_true_lang.js +127 -0
- package/dist/vue/Ripples.js +3 -0
- package/dist/vue/Ripples.vue_vue_type_script_setup_true_lang.js +131 -0
- package/dist/vue/Saturation.js +3 -0
- package/dist/vue/Saturation.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/Shader.js +3 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +153 -0
- package/dist/vue/Sharpness.js +3 -0
- package/dist/vue/Sharpness.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/Shatter.js +3 -0
- package/dist/vue/Shatter.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/vue/SimplexNoise.js +3 -0
- package/dist/vue/SimplexNoise.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/vue/SineWave.js +3 -0
- package/dist/vue/SineWave.vue_vue_type_script_setup_true_lang.js +131 -0
- package/dist/vue/SolidColor.js +3 -0
- package/dist/vue/SolidColor.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/Spherize.js +3 -0
- package/dist/vue/Spherize.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/vue/Spiral.js +3 -0
- package/dist/vue/Spiral.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/vue/Strands.js +3 -0
- package/dist/vue/Strands.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/vue/Stretch.js +3 -0
- package/dist/vue/Stretch.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Stripes.js +3 -0
- package/dist/vue/Stripes.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/vue/Swirl.js +3 -0
- package/dist/vue/Swirl.vue_vue_type_script_setup_true_lang.js +129 -0
- package/dist/vue/TiltShift.js +3 -0
- package/dist/vue/TiltShift.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Tint.js +3 -0
- package/dist/vue/Tint.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/Tritone.js +3 -0
- package/dist/vue/Tritone.vue_vue_type_script_setup_true_lang.js +128 -0
- package/dist/vue/Twirl.js +3 -0
- package/dist/vue/Twirl.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/vue/Vibrance.js +3 -0
- package/dist/vue/Vibrance.vue_vue_type_script_setup_true_lang.js +124 -0
- package/dist/vue/WaveDistortion.js +3 -0
- package/dist/vue/WaveDistortion.vue_vue_type_script_setup_true_lang.js +129 -0
- package/dist/vue/WebcamTexture.js +3 -0
- package/dist/vue/WebcamTexture.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/ZoomBlur.js +3 -0
- package/dist/vue/ZoomBlur.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/vue/index.js +64 -7870
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +391 -1
- package/package.json +1 -1
- package/dist/react/generatePresetCode-D0yiVxb4.js +0 -748
- package/dist/svelte/generatePresetCode-DUGaV_ym.js +0 -748
- package/dist/vue/generatePresetCode-CShQ8TLw.js +0 -747
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
var DEFAULT_TRANSFORM = {
|
|
2
|
+
offsetX: 0,
|
|
3
|
+
offsetY: 0,
|
|
4
|
+
rotation: 0,
|
|
5
|
+
scale: 1,
|
|
6
|
+
anchorX: .5,
|
|
7
|
+
anchorY: .5,
|
|
8
|
+
edges: "transparent"
|
|
9
|
+
};
|
|
10
|
+
function toObjectLiteral(obj) {
|
|
11
|
+
return `{ ${Object.entries(obj).map(([key, value]) => {
|
|
12
|
+
return `${key}: ${typeof value === "string" ? `"${value}"` : value}`;
|
|
13
|
+
}).join(", ")} }`;
|
|
14
|
+
}
|
|
15
|
+
var shaderMetadata = {
|
|
16
|
+
"AngularBlur": {
|
|
17
|
+
"opacity": 1,
|
|
18
|
+
"blendMode": "normal"
|
|
19
|
+
},
|
|
20
|
+
"Ascii": {
|
|
21
|
+
"opacity": 1,
|
|
22
|
+
"blendMode": "normal"
|
|
23
|
+
},
|
|
24
|
+
"Beam": {
|
|
25
|
+
"opacity": 1,
|
|
26
|
+
"blendMode": "normal"
|
|
27
|
+
},
|
|
28
|
+
"Blob": {
|
|
29
|
+
"opacity": 1,
|
|
30
|
+
"blendMode": "normal"
|
|
31
|
+
},
|
|
32
|
+
"Blur": {
|
|
33
|
+
"opacity": 1,
|
|
34
|
+
"blendMode": "normal"
|
|
35
|
+
},
|
|
36
|
+
"BrightnessContrast": {
|
|
37
|
+
"opacity": 1,
|
|
38
|
+
"blendMode": "normal"
|
|
39
|
+
},
|
|
40
|
+
"Bulge": {
|
|
41
|
+
"opacity": 1,
|
|
42
|
+
"blendMode": "normal"
|
|
43
|
+
},
|
|
44
|
+
"CRTScreen": {
|
|
45
|
+
"opacity": 1,
|
|
46
|
+
"blendMode": "normal"
|
|
47
|
+
},
|
|
48
|
+
"ChannelBlur": {
|
|
49
|
+
"opacity": 1,
|
|
50
|
+
"blendMode": "normal"
|
|
51
|
+
},
|
|
52
|
+
"Checkerboard": {
|
|
53
|
+
"opacity": 1,
|
|
54
|
+
"blendMode": "normal"
|
|
55
|
+
},
|
|
56
|
+
"ChromaFlow": {
|
|
57
|
+
"opacity": 1,
|
|
58
|
+
"blendMode": "normal"
|
|
59
|
+
},
|
|
60
|
+
"ChromaticAberration": {
|
|
61
|
+
"opacity": 1,
|
|
62
|
+
"blendMode": "normal"
|
|
63
|
+
},
|
|
64
|
+
"Circle": {
|
|
65
|
+
"opacity": 1,
|
|
66
|
+
"blendMode": "normal"
|
|
67
|
+
},
|
|
68
|
+
"CursorTrail": {
|
|
69
|
+
"opacity": 1,
|
|
70
|
+
"blendMode": "normal"
|
|
71
|
+
},
|
|
72
|
+
"DiffuseBlur": {
|
|
73
|
+
"opacity": 1,
|
|
74
|
+
"blendMode": "normal"
|
|
75
|
+
},
|
|
76
|
+
"Dither": {
|
|
77
|
+
"opacity": 1,
|
|
78
|
+
"blendMode": "normal"
|
|
79
|
+
},
|
|
80
|
+
"DotGrid": {
|
|
81
|
+
"opacity": 1,
|
|
82
|
+
"blendMode": "normal"
|
|
83
|
+
},
|
|
84
|
+
"Duotone": {
|
|
85
|
+
"opacity": 1,
|
|
86
|
+
"blendMode": "normal"
|
|
87
|
+
},
|
|
88
|
+
"FilmGrain": {
|
|
89
|
+
"opacity": 1,
|
|
90
|
+
"blendMode": "normal"
|
|
91
|
+
},
|
|
92
|
+
"FloatingParticles": {
|
|
93
|
+
"opacity": 1,
|
|
94
|
+
"blendMode": "normal"
|
|
95
|
+
},
|
|
96
|
+
"GlassTiles": {
|
|
97
|
+
"opacity": 1,
|
|
98
|
+
"blendMode": "normal"
|
|
99
|
+
},
|
|
100
|
+
"Glow": {
|
|
101
|
+
"opacity": 1,
|
|
102
|
+
"blendMode": "normal"
|
|
103
|
+
},
|
|
104
|
+
"Godrays": {
|
|
105
|
+
"opacity": 1,
|
|
106
|
+
"blendMode": "normal"
|
|
107
|
+
},
|
|
108
|
+
"Grayscale": {
|
|
109
|
+
"opacity": 1,
|
|
110
|
+
"blendMode": "normal"
|
|
111
|
+
},
|
|
112
|
+
"Grid": {
|
|
113
|
+
"opacity": 1,
|
|
114
|
+
"blendMode": "normal"
|
|
115
|
+
},
|
|
116
|
+
"GridDistortion": {
|
|
117
|
+
"opacity": 1,
|
|
118
|
+
"blendMode": "normal"
|
|
119
|
+
},
|
|
120
|
+
"Group": {
|
|
121
|
+
"opacity": 1,
|
|
122
|
+
"blendMode": "normal"
|
|
123
|
+
},
|
|
124
|
+
"Halftone": {
|
|
125
|
+
"opacity": 1,
|
|
126
|
+
"blendMode": "normal"
|
|
127
|
+
},
|
|
128
|
+
"HueShift": {
|
|
129
|
+
"opacity": 1,
|
|
130
|
+
"blendMode": "normal"
|
|
131
|
+
},
|
|
132
|
+
"ImageTexture": {
|
|
133
|
+
"opacity": 1,
|
|
134
|
+
"blendMode": "normal"
|
|
135
|
+
},
|
|
136
|
+
"Invert": {
|
|
137
|
+
"opacity": 1,
|
|
138
|
+
"blendMode": "normal"
|
|
139
|
+
},
|
|
140
|
+
"LinearBlur": {
|
|
141
|
+
"opacity": 1,
|
|
142
|
+
"blendMode": "normal"
|
|
143
|
+
},
|
|
144
|
+
"LinearGradient": {
|
|
145
|
+
"opacity": 1,
|
|
146
|
+
"blendMode": "normal"
|
|
147
|
+
},
|
|
148
|
+
"Liquify": {
|
|
149
|
+
"opacity": 1,
|
|
150
|
+
"blendMode": "normal"
|
|
151
|
+
},
|
|
152
|
+
"Perspective": {
|
|
153
|
+
"opacity": 1,
|
|
154
|
+
"blendMode": "normal"
|
|
155
|
+
},
|
|
156
|
+
"Pixelate": {
|
|
157
|
+
"opacity": 1,
|
|
158
|
+
"blendMode": "normal"
|
|
159
|
+
},
|
|
160
|
+
"PolarCoordinates": {
|
|
161
|
+
"opacity": 1,
|
|
162
|
+
"blendMode": "normal"
|
|
163
|
+
},
|
|
164
|
+
"Posterize": {
|
|
165
|
+
"opacity": 1,
|
|
166
|
+
"blendMode": "normal"
|
|
167
|
+
},
|
|
168
|
+
"ProgressiveBlur": {
|
|
169
|
+
"opacity": 1,
|
|
170
|
+
"blendMode": "normal"
|
|
171
|
+
},
|
|
172
|
+
"RadialGradient": {
|
|
173
|
+
"opacity": 1,
|
|
174
|
+
"blendMode": "normal"
|
|
175
|
+
},
|
|
176
|
+
"RectangularCoordinates": {
|
|
177
|
+
"opacity": 1,
|
|
178
|
+
"blendMode": "normal"
|
|
179
|
+
},
|
|
180
|
+
"Ripples": {
|
|
181
|
+
"opacity": 1,
|
|
182
|
+
"blendMode": "normal"
|
|
183
|
+
},
|
|
184
|
+
"Saturation": {
|
|
185
|
+
"opacity": 1,
|
|
186
|
+
"blendMode": "normal"
|
|
187
|
+
},
|
|
188
|
+
"Sharpness": {
|
|
189
|
+
"opacity": 1,
|
|
190
|
+
"blendMode": "normal"
|
|
191
|
+
},
|
|
192
|
+
"Shatter": {
|
|
193
|
+
"opacity": 1,
|
|
194
|
+
"blendMode": "normal"
|
|
195
|
+
},
|
|
196
|
+
"SimplexNoise": {
|
|
197
|
+
"opacity": 1,
|
|
198
|
+
"blendMode": "normal"
|
|
199
|
+
},
|
|
200
|
+
"SineWave": {
|
|
201
|
+
"opacity": 1,
|
|
202
|
+
"blendMode": "normal"
|
|
203
|
+
},
|
|
204
|
+
"SolidColor": {
|
|
205
|
+
"opacity": 1,
|
|
206
|
+
"blendMode": "normal"
|
|
207
|
+
},
|
|
208
|
+
"Spherize": {
|
|
209
|
+
"opacity": 1,
|
|
210
|
+
"blendMode": "normal"
|
|
211
|
+
},
|
|
212
|
+
"Spiral": {
|
|
213
|
+
"opacity": 1,
|
|
214
|
+
"blendMode": "normal"
|
|
215
|
+
},
|
|
216
|
+
"Strands": {
|
|
217
|
+
"opacity": 1,
|
|
218
|
+
"blendMode": "normal"
|
|
219
|
+
},
|
|
220
|
+
"Stretch": {
|
|
221
|
+
"opacity": 1,
|
|
222
|
+
"blendMode": "normal"
|
|
223
|
+
},
|
|
224
|
+
"Stripes": {
|
|
225
|
+
"opacity": 1,
|
|
226
|
+
"blendMode": "normal"
|
|
227
|
+
},
|
|
228
|
+
"Swirl": {
|
|
229
|
+
"opacity": 1,
|
|
230
|
+
"blendMode": "normal"
|
|
231
|
+
},
|
|
232
|
+
"TiltShift": {
|
|
233
|
+
"opacity": 1,
|
|
234
|
+
"blendMode": "normal"
|
|
235
|
+
},
|
|
236
|
+
"Tint": {
|
|
237
|
+
"opacity": 1,
|
|
238
|
+
"blendMode": "normal"
|
|
239
|
+
},
|
|
240
|
+
"Tritone": {
|
|
241
|
+
"opacity": 1,
|
|
242
|
+
"blendMode": "normal"
|
|
243
|
+
},
|
|
244
|
+
"Twirl": {
|
|
245
|
+
"opacity": 1,
|
|
246
|
+
"blendMode": "normal"
|
|
247
|
+
},
|
|
248
|
+
"Vibrance": {
|
|
249
|
+
"opacity": 1,
|
|
250
|
+
"blendMode": "normal"
|
|
251
|
+
},
|
|
252
|
+
"WaveDistortion": {
|
|
253
|
+
"opacity": 1,
|
|
254
|
+
"blendMode": "normal"
|
|
255
|
+
},
|
|
256
|
+
"WebcamTexture": {
|
|
257
|
+
"opacity": 1,
|
|
258
|
+
"blendMode": "normal"
|
|
259
|
+
},
|
|
260
|
+
"ZoomBlur": {
|
|
261
|
+
"opacity": 1,
|
|
262
|
+
"blendMode": "normal"
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
function generatePropString(props, componentType, indent = " ") {
|
|
266
|
+
return Object.entries(props).sort(([a], [b]) => a.localeCompare(b)).filter(([key, value]) => {
|
|
267
|
+
if (key === "maskType" && value === "alpha") return false;
|
|
268
|
+
if (key === "transform" && typeof value === "object") {
|
|
269
|
+
if (Object.keys(DEFAULT_TRANSFORM).every((k) => value[k] === DEFAULT_TRANSFORM[k])) return false;
|
|
270
|
+
}
|
|
271
|
+
const componentDefaults = shaderMetadata[componentType] || {};
|
|
272
|
+
if (componentDefaults.hasOwnProperty(key)) {
|
|
273
|
+
const defaultValue = componentDefaults[key];
|
|
274
|
+
if (value != null && defaultValue != null && typeof value === "object" && typeof defaultValue === "object") return JSON.stringify(value) !== JSON.stringify(defaultValue);
|
|
275
|
+
return value !== defaultValue;
|
|
276
|
+
}
|
|
277
|
+
if (key === "opacity" && value === 1) return false;
|
|
278
|
+
if (key === "blendMode" && value === "normal") return false;
|
|
279
|
+
return true;
|
|
280
|
+
}).map(([key, value]) => {
|
|
281
|
+
if (key === "transform" && typeof value === "object") {
|
|
282
|
+
const nonDefaultKeys = {};
|
|
283
|
+
for (const k in value) if (value[k] !== DEFAULT_TRANSFORM[k]) nonDefaultKeys[k] = value[k];
|
|
284
|
+
const keys = Object.keys(nonDefaultKeys).sort();
|
|
285
|
+
if (keys.length > 1) return `${key}={{\n${indent} ${keys.map((k) => `${k}: ${typeof nonDefaultKeys[k] === "string" ? `"${nonDefaultKeys[k]}"` : nonDefaultKeys[k]}`).join(`,\n${indent} `)}\n${indent} }}`;
|
|
286
|
+
else if (keys.length === 1) {
|
|
287
|
+
const k = keys[0];
|
|
288
|
+
const v = nonDefaultKeys[k];
|
|
289
|
+
return `${key}={{ ${k}: ${typeof v === "string" ? `"${v}"` : v} }}`;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if (typeof value === "string") return `${key}="${value}"`;
|
|
293
|
+
else if (value !== null && typeof value === "object") {
|
|
294
|
+
const roundedValue = { ...value };
|
|
295
|
+
if ("x" in roundedValue && typeof roundedValue.x === "number") roundedValue.x = Math.round(roundedValue.x * 100) / 100;
|
|
296
|
+
if ("y" in roundedValue && typeof roundedValue.y === "number") roundedValue.y = Math.round(roundedValue.y * 100) / 100;
|
|
297
|
+
return `${key}={${toObjectLiteral(roundedValue)}}`;
|
|
298
|
+
} else return `${key}={${value}}`;
|
|
299
|
+
}).join("\n" + indent + " ");
|
|
300
|
+
}
|
|
301
|
+
function isIdUsedAsMaskSource(id, allComponents) {
|
|
302
|
+
const flatComponents = [];
|
|
303
|
+
function flattenComponents(components) {
|
|
304
|
+
for (const component of components) {
|
|
305
|
+
flatComponents.push(component);
|
|
306
|
+
if (component.children) flattenComponents(component.children);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
flattenComponents(allComponents);
|
|
310
|
+
return flatComponents.some((component) => component.props?.maskSource === id);
|
|
311
|
+
}
|
|
312
|
+
function generatePresetCode(preset) {
|
|
313
|
+
const generateComponentString = (config, indent = " ") => {
|
|
314
|
+
const propString = config.props ? generatePropString(config.props, config.type, indent) : "";
|
|
315
|
+
let idString = "";
|
|
316
|
+
if (config.id) {
|
|
317
|
+
if (isIdUsedAsMaskSource(config.id, preset.components)) idString = `id="${config.id}"`;
|
|
318
|
+
}
|
|
319
|
+
const attributes = [idString, propString].filter(Boolean).join("\n" + indent + " ");
|
|
320
|
+
if (config.children && config.children.length > 0) {
|
|
321
|
+
const childrenString = config.children.map((child) => generateComponentString(child, indent + " ")).join("\n");
|
|
322
|
+
if (attributes) return `${indent}<${config.type}\n${indent} ${attributes}>\n${childrenString}\n${indent}</${config.type}>`;
|
|
323
|
+
else return `${indent}<${config.type}>\n${childrenString}\n${indent}</${config.type}>`;
|
|
324
|
+
} else if (attributes) return `${indent}<${config.type}\n${indent} ${attributes} />`;
|
|
325
|
+
else return `${indent}<${config.type} />`;
|
|
326
|
+
};
|
|
327
|
+
return `<Shader>\n${preset.components.map((config) => generateComponentString(config)).join("\n")}\n</Shader>`;
|
|
328
|
+
}
|
|
329
|
+
const availableComponents = [
|
|
330
|
+
"AngularBlur",
|
|
331
|
+
"Ascii",
|
|
332
|
+
"Beam",
|
|
333
|
+
"Blob",
|
|
334
|
+
"Blur",
|
|
335
|
+
"BrightnessContrast",
|
|
336
|
+
"Bulge",
|
|
337
|
+
"CRTScreen",
|
|
338
|
+
"ChannelBlur",
|
|
339
|
+
"Checkerboard",
|
|
340
|
+
"ChromaFlow",
|
|
341
|
+
"ChromaticAberration",
|
|
342
|
+
"Circle",
|
|
343
|
+
"CursorTrail",
|
|
344
|
+
"DiffuseBlur",
|
|
345
|
+
"Dither",
|
|
346
|
+
"DotGrid",
|
|
347
|
+
"Duotone",
|
|
348
|
+
"FilmGrain",
|
|
349
|
+
"FloatingParticles",
|
|
350
|
+
"GlassTiles",
|
|
351
|
+
"Glow",
|
|
352
|
+
"Godrays",
|
|
353
|
+
"Grayscale",
|
|
354
|
+
"Grid",
|
|
355
|
+
"GridDistortion",
|
|
356
|
+
"Group",
|
|
357
|
+
"Halftone",
|
|
358
|
+
"HueShift",
|
|
359
|
+
"ImageTexture",
|
|
360
|
+
"Invert",
|
|
361
|
+
"LinearBlur",
|
|
362
|
+
"LinearGradient",
|
|
363
|
+
"Liquify",
|
|
364
|
+
"Perspective",
|
|
365
|
+
"Pixelate",
|
|
366
|
+
"PolarCoordinates",
|
|
367
|
+
"Posterize",
|
|
368
|
+
"ProgressiveBlur",
|
|
369
|
+
"RadialGradient",
|
|
370
|
+
"RectangularCoordinates",
|
|
371
|
+
"Ripples",
|
|
372
|
+
"Saturation",
|
|
373
|
+
"Sharpness",
|
|
374
|
+
"Shatter",
|
|
375
|
+
"SimplexNoise",
|
|
376
|
+
"SineWave",
|
|
377
|
+
"SolidColor",
|
|
378
|
+
"Spherize",
|
|
379
|
+
"Spiral",
|
|
380
|
+
"Strands",
|
|
381
|
+
"Stretch",
|
|
382
|
+
"Stripes",
|
|
383
|
+
"Swirl",
|
|
384
|
+
"TiltShift",
|
|
385
|
+
"Tint",
|
|
386
|
+
"Tritone",
|
|
387
|
+
"Twirl",
|
|
388
|
+
"Vibrance",
|
|
389
|
+
"WaveDistortion",
|
|
390
|
+
"WebcamTexture",
|
|
391
|
+
"ZoomBlur"
|
|
392
|
+
];
|
|
393
|
+
export { generatePresetCode as n, availableComponents as t };
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generatePresetCode } from "./generatePresetCode-
|
|
1
|
+
import { n as generatePresetCode } from "./generatePresetCode-CtXcoyI0.js";
|
|
2
2
|
import "svelte/internal/disclose-version";
|
|
3
3
|
import * as $ from "svelte/internal/client";
|
|
4
4
|
import { getContext, onDestroy, onMount, setContext } from "svelte";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-
|
|
1
|
+
import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-CtXcoyI0.js";
|
|
2
2
|
export { availableComponents, generatePresetCode };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { computed, defineComponent, effectScope, inject, mergeDefaults, onBeforeUnmount, provide, renderSlot, toValue, watch } from "vue";
|
|
2
|
+
import { createUniformsMap } from "../core/index.js";
|
|
3
|
+
import { componentDefinition } from "../core/shaders/AngularBlur/index.js";
|
|
4
|
+
var AngularBlur_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "AngularBlur",
|
|
6
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
7
|
+
blendMode: {},
|
|
8
|
+
opacity: {},
|
|
9
|
+
visible: { type: Boolean },
|
|
10
|
+
id: {},
|
|
11
|
+
maskSource: {},
|
|
12
|
+
maskType: {},
|
|
13
|
+
renderOrder: {},
|
|
14
|
+
transform: {},
|
|
15
|
+
intensity: {},
|
|
16
|
+
center: {}
|
|
17
|
+
}, {
|
|
18
|
+
blendMode: "normal",
|
|
19
|
+
renderOrder: 0,
|
|
20
|
+
visible: true,
|
|
21
|
+
...Object.entries(componentDefinition.props).reduce((acc, [key, config]) => {
|
|
22
|
+
acc[key] = config.default;
|
|
23
|
+
return acc;
|
|
24
|
+
}, {})
|
|
25
|
+
}),
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const instanceId = props.id || `${componentDefinition.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
|
|
29
|
+
provide("ombreParentId", instanceId);
|
|
30
|
+
const DEFAULT_TRANSFORM = {
|
|
31
|
+
offsetX: 0,
|
|
32
|
+
offsetY: 0,
|
|
33
|
+
rotation: 0,
|
|
34
|
+
scale: 1,
|
|
35
|
+
anchorX: .5,
|
|
36
|
+
anchorY: .5,
|
|
37
|
+
edges: "transparent"
|
|
38
|
+
};
|
|
39
|
+
const effectiveTransform = computed(() => ({
|
|
40
|
+
...DEFAULT_TRANSFORM,
|
|
41
|
+
...props.transform
|
|
42
|
+
}));
|
|
43
|
+
const uniforms = createUniformsMap(componentDefinition, computed(() => {
|
|
44
|
+
let baseProps = { ...Object.entries(componentDefinition.props).reduce((acc, [key, config]) => {
|
|
45
|
+
acc[key] = config.default;
|
|
46
|
+
return acc;
|
|
47
|
+
}, {}) };
|
|
48
|
+
for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && props[key] !== Object.entries(componentDefinition.props).reduce((acc, [key$1, config]) => {
|
|
49
|
+
acc[key$1] = config.default;
|
|
50
|
+
return acc;
|
|
51
|
+
}, {})[key]) baseProps[key] = toValue(props[key]);
|
|
52
|
+
return baseProps;
|
|
53
|
+
}).value, instanceId);
|
|
54
|
+
const parentId = inject("ombreParentId");
|
|
55
|
+
if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
56
|
+
const parentRegister = inject("ombreNodeRegister");
|
|
57
|
+
if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
58
|
+
const parentUniformUpdate = inject("ombreUniformUpdate");
|
|
59
|
+
if (parentUniformUpdate === void 0) throw new Error("Shader components require ombreUniformUpdate from parent");
|
|
60
|
+
const parentMetadataUpdate = inject("ombreMetadataUpdate");
|
|
61
|
+
if (parentMetadataUpdate === void 0) throw new Error("Shader components require ombreMetadataUpdate from parent");
|
|
62
|
+
const rendererResetSignal = inject("ombreRendererResetSignal");
|
|
63
|
+
const registerWithRenderer = () => {
|
|
64
|
+
parentRegister(instanceId, componentDefinition.fragmentNode, parentId, {
|
|
65
|
+
blendMode: props.blendMode,
|
|
66
|
+
opacity: props.opacity,
|
|
67
|
+
visible: props.visible === false ? false : true,
|
|
68
|
+
id: props.id,
|
|
69
|
+
mask: props.maskSource ? {
|
|
70
|
+
source: props.maskSource,
|
|
71
|
+
type: props.maskType || "alpha"
|
|
72
|
+
} : void 0,
|
|
73
|
+
renderOrder: props.renderOrder,
|
|
74
|
+
transform: effectiveTransform.value
|
|
75
|
+
}, uniforms, componentDefinition);
|
|
76
|
+
};
|
|
77
|
+
const setupUniformWatchers = () => {
|
|
78
|
+
const scope = effectScope();
|
|
79
|
+
scope.run(() => {
|
|
80
|
+
Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
|
|
81
|
+
watch(() => props[propName], (newValue) => {
|
|
82
|
+
if (uniform && uniform.value !== void 0) parentUniformUpdate(instanceId, propName, newValue);
|
|
83
|
+
}, { deep: true });
|
|
84
|
+
});
|
|
85
|
+
watch(() => [
|
|
86
|
+
props.blendMode,
|
|
87
|
+
props.opacity,
|
|
88
|
+
props.visible,
|
|
89
|
+
props.id,
|
|
90
|
+
props.maskSource,
|
|
91
|
+
props.maskType,
|
|
92
|
+
props.renderOrder,
|
|
93
|
+
props.transform
|
|
94
|
+
], ([blendMode, opacity, visible]) => {
|
|
95
|
+
parentMetadataUpdate(instanceId, {
|
|
96
|
+
blendMode,
|
|
97
|
+
opacity,
|
|
98
|
+
visible: visible === false ? false : true,
|
|
99
|
+
id: props.id,
|
|
100
|
+
mask: props.maskSource ? {
|
|
101
|
+
source: props.maskSource,
|
|
102
|
+
type: props.maskType || "alpha"
|
|
103
|
+
} : void 0,
|
|
104
|
+
renderOrder: props.renderOrder,
|
|
105
|
+
transform: effectiveTransform.value
|
|
106
|
+
});
|
|
107
|
+
}, { deep: true });
|
|
108
|
+
if (rendererResetSignal) watch(() => rendererResetSignal.value, (newValue) => {
|
|
109
|
+
if (newValue > 0) registerWithRenderer();
|
|
110
|
+
}, { immediate: true });
|
|
111
|
+
});
|
|
112
|
+
onBeforeUnmount(() => {
|
|
113
|
+
scope.stop();
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
setupUniformWatchers();
|
|
117
|
+
onBeforeUnmount(() => {
|
|
118
|
+
parentRegister(instanceId, null, null, null, null, null);
|
|
119
|
+
});
|
|
120
|
+
return (_ctx, _cache) => {
|
|
121
|
+
return renderSlot(_ctx.$slots, "default");
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export { AngularBlur_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { computed, defineComponent, effectScope, inject, mergeDefaults, onBeforeUnmount, provide, renderSlot, toValue, watch } from "vue";
|
|
2
|
+
import { createUniformsMap } from "../core/index.js";
|
|
3
|
+
import { componentDefinition } from "../core/shaders/Ascii/index.js";
|
|
4
|
+
var Ascii_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "Ascii",
|
|
6
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
7
|
+
blendMode: {},
|
|
8
|
+
opacity: {},
|
|
9
|
+
visible: { type: Boolean },
|
|
10
|
+
id: {},
|
|
11
|
+
maskSource: {},
|
|
12
|
+
maskType: {},
|
|
13
|
+
renderOrder: {},
|
|
14
|
+
transform: {},
|
|
15
|
+
characters: {},
|
|
16
|
+
cellSize: {},
|
|
17
|
+
fontFamily: {},
|
|
18
|
+
spacing: {}
|
|
19
|
+
}, {
|
|
20
|
+
blendMode: "normal",
|
|
21
|
+
renderOrder: 0,
|
|
22
|
+
visible: true,
|
|
23
|
+
...Object.entries(componentDefinition.props).reduce((acc, [key, config]) => {
|
|
24
|
+
acc[key] = config.default;
|
|
25
|
+
return acc;
|
|
26
|
+
}, {})
|
|
27
|
+
}),
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const instanceId = props.id || `${componentDefinition.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
|
|
31
|
+
provide("ombreParentId", instanceId);
|
|
32
|
+
const DEFAULT_TRANSFORM = {
|
|
33
|
+
offsetX: 0,
|
|
34
|
+
offsetY: 0,
|
|
35
|
+
rotation: 0,
|
|
36
|
+
scale: 1,
|
|
37
|
+
anchorX: .5,
|
|
38
|
+
anchorY: .5,
|
|
39
|
+
edges: "transparent"
|
|
40
|
+
};
|
|
41
|
+
const effectiveTransform = computed(() => ({
|
|
42
|
+
...DEFAULT_TRANSFORM,
|
|
43
|
+
...props.transform
|
|
44
|
+
}));
|
|
45
|
+
const uniforms = createUniformsMap(componentDefinition, computed(() => {
|
|
46
|
+
let baseProps = { ...Object.entries(componentDefinition.props).reduce((acc, [key, config]) => {
|
|
47
|
+
acc[key] = config.default;
|
|
48
|
+
return acc;
|
|
49
|
+
}, {}) };
|
|
50
|
+
for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && props[key] !== Object.entries(componentDefinition.props).reduce((acc, [key$1, config]) => {
|
|
51
|
+
acc[key$1] = config.default;
|
|
52
|
+
return acc;
|
|
53
|
+
}, {})[key]) baseProps[key] = toValue(props[key]);
|
|
54
|
+
return baseProps;
|
|
55
|
+
}).value, instanceId);
|
|
56
|
+
const parentId = inject("ombreParentId");
|
|
57
|
+
if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
58
|
+
const parentRegister = inject("ombreNodeRegister");
|
|
59
|
+
if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
|
|
60
|
+
const parentUniformUpdate = inject("ombreUniformUpdate");
|
|
61
|
+
if (parentUniformUpdate === void 0) throw new Error("Shader components require ombreUniformUpdate from parent");
|
|
62
|
+
const parentMetadataUpdate = inject("ombreMetadataUpdate");
|
|
63
|
+
if (parentMetadataUpdate === void 0) throw new Error("Shader components require ombreMetadataUpdate from parent");
|
|
64
|
+
const rendererResetSignal = inject("ombreRendererResetSignal");
|
|
65
|
+
const registerWithRenderer = () => {
|
|
66
|
+
parentRegister(instanceId, componentDefinition.fragmentNode, parentId, {
|
|
67
|
+
blendMode: props.blendMode,
|
|
68
|
+
opacity: props.opacity,
|
|
69
|
+
visible: props.visible === false ? false : true,
|
|
70
|
+
id: props.id,
|
|
71
|
+
mask: props.maskSource ? {
|
|
72
|
+
source: props.maskSource,
|
|
73
|
+
type: props.maskType || "alpha"
|
|
74
|
+
} : void 0,
|
|
75
|
+
renderOrder: props.renderOrder,
|
|
76
|
+
transform: effectiveTransform.value
|
|
77
|
+
}, uniforms, componentDefinition);
|
|
78
|
+
};
|
|
79
|
+
const setupUniformWatchers = () => {
|
|
80
|
+
const scope = effectScope();
|
|
81
|
+
scope.run(() => {
|
|
82
|
+
Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
|
|
83
|
+
watch(() => props[propName], (newValue) => {
|
|
84
|
+
if (uniform && uniform.value !== void 0) parentUniformUpdate(instanceId, propName, newValue);
|
|
85
|
+
}, { deep: true });
|
|
86
|
+
});
|
|
87
|
+
watch(() => [
|
|
88
|
+
props.blendMode,
|
|
89
|
+
props.opacity,
|
|
90
|
+
props.visible,
|
|
91
|
+
props.id,
|
|
92
|
+
props.maskSource,
|
|
93
|
+
props.maskType,
|
|
94
|
+
props.renderOrder,
|
|
95
|
+
props.transform
|
|
96
|
+
], ([blendMode, opacity, visible]) => {
|
|
97
|
+
parentMetadataUpdate(instanceId, {
|
|
98
|
+
blendMode,
|
|
99
|
+
opacity,
|
|
100
|
+
visible: visible === false ? false : true,
|
|
101
|
+
id: props.id,
|
|
102
|
+
mask: props.maskSource ? {
|
|
103
|
+
source: props.maskSource,
|
|
104
|
+
type: props.maskType || "alpha"
|
|
105
|
+
} : void 0,
|
|
106
|
+
renderOrder: props.renderOrder,
|
|
107
|
+
transform: effectiveTransform.value
|
|
108
|
+
});
|
|
109
|
+
}, { deep: true });
|
|
110
|
+
if (rendererResetSignal) watch(() => rendererResetSignal.value, (newValue) => {
|
|
111
|
+
if (newValue > 0) registerWithRenderer();
|
|
112
|
+
}, { immediate: true });
|
|
113
|
+
});
|
|
114
|
+
onBeforeUnmount(() => {
|
|
115
|
+
scope.stop();
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
setupUniformWatchers();
|
|
119
|
+
onBeforeUnmount(() => {
|
|
120
|
+
parentRegister(instanceId, null, null, null, null, null);
|
|
121
|
+
});
|
|
122
|
+
return (_ctx, _cache) => {
|
|
123
|
+
return renderSlot(_ctx.$slots, "default");
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export { Ascii_vue_vue_type_script_setup_true_lang_default as default };
|
package/dist/vue/Beam.js
ADDED