AS3 Circle Gradient
March 30th, 2010 • ActionScript, Flash, Projects
According to my previous post about the AS3 Circle Color Spectrum I wanted to implement the circle gradient in pixel bender as well, so there you go. You can specify up to 4 colors and control the appearance with the corresponding ratio.
the parameters for the shader
- center for passing in the x and y
- innerRadius and outerRadius for controling the size of the circle
- rotation (0-360) to change the starting angle
- color1, color2, color3, color4 in the format RGBA (1.0, 1.0, 1.0, 1.0 = 0xffffffff)
- ratios an array of color distribution ratio
Play with the filter…
Download Circle Gradient filter & pixel bender source
