svg-filters | SVG Filters Playground | Frontend Framework library
kandi X-RAY | svg-filters Summary
kandi X-RAY | svg-filters Summary
✨ SVG Filters Playground
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Register new SWF service
- Checks if a service worker is reloaded
- Unregister the service worker
svg-filters Key Features
svg-filters Examples and Code Snippets
Community Discussions
Trending Discussions on svg-filters
QUESTION
I want to blur an image's corners, while retaining a sharp center. Using css backdrop-blur() is out of question, because Firefox does not support it. Adding a sharp image on top of a blurry one and then masking the first one out is not feaseable aswell, as in the end I want to change the static image with a three.js scene.
I tried to follow this tutorial, but with a radial gradient, rather than a fixed bar.
...ANSWER
Answered 2021-Nov-19 at 10:56You have to do a little more work than that - you can't drop a radialGradient in the middle of a filter - only filter primitives are allowed inside a filter and you need to import any image/shape you want to use via feImage.
Also, when masking via feComposite/in - the "in" operator only uses the alpha channel (unlike actual masks that use luminance) - so you can use a black/black gradient with a variable opacity.
Lastly, because Firefox doesn't support fragment identifiers inside feImage, if you want FF support, you have to define your mask in the content and import the image you want to use via feImage. This makes the filter not reusable, but if this is once off content that's fine. If you do want to use this filter more generally, then you can define a gradient-filled rect and then convert it in to a full SVG image that you then inline via a data:uri inside a feImage. This is more work (and I always seem to get the escaping rules for svg+xml data URI's wrong) - so I didn't do it here.
FWIW - that tutorial is both complete and correct.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install svg-filters
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page