SXRadialBlurFilter

author:
Alessandro Maroso
description:
A simple radial blur filter.
lastupdate:
2014-11-27
compatible:
v2.1
homepage:
https://gist.github.com/membersheep/bbf5f7d0b524913b592e
download:
https://gist.github.com/membersheep/bbf5f7d0b524913b592e/download

Usage

Altering the parameters will dinamically affect the result.

Usage example:

SXRadialBlurFilter *filter = [SXRadialBlurFilter blurFilter];
filter.blurCenterPosition = [SPPoint pointWithX:center.x y:center.y];
filter.distance = 1;
filter.strength = 2;
displayObject.filter = filter;

Notes

  • The filter is written with MRC; if you want to add this filter in an ARC-enabled project, follow these steps to selectively deactivate ARC for the radial blur filter.
  • Use the marginX/Y property of the filter if it the effect is cut at the sides.
  • Change the “blur” parameter to change the number of passes. More passes result in a smoother blur but also worse performances.

Changelog

  • 2014/11/27 20:58: First public version

Source Code

Discussion

No comments so far. Feel free to edit this part of the page.

  extensions/sxradialblurfilter.txt · Last modified: 2015/09/14 11:14 by 127.0.0.1
 
Powered by DokuWiki