How would I make a canvas shape go out of focus?
I’ve seen it done with webGl and I was hoping there was a way to do it with canvas and JS?
I want to be able to animate the amount of blur so I can’t use an image.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re going to want a Javascript library. Here’s a good one for that purpose that allows you to pick an X,Y and width/height on the canvas to blur:
http://www.quasimondo.com/BoxBlurForCanvas/FastBlur.js
And here’s the demo:
http://www.quasimondo.com/BoxBlurForCanvas/FastBlurDemo.html