How does Blur Filter work in HTML5 Kinetic.Filters

2019-04-29 15:11发布

问题:

How I can use blur filter in HTML5? I find this:

Kinetic.Filters.Blur(imageData, config )  

and Parameters:

imageData  {Object}  
config {Object}  
config.radius {Integer}  

Explain to me with an example that how I can do this.

回答1:

var image = new Kinetic.Image({
      x: 10,
      y: 10,
      image: imageObj,
      filter: Kinetic.Filters.Blur,
      filterRadius: 20
  });

Checkout this tutorial: http://www.html5canvastutorials.com/kineticjs/html5-canvas-tween-blur-filter-with-kineticjs/