HeaderV2 (FibersV2 class)
Hi,
I have updated my header so I’ll post the new code. The FibersV2 class is almost the same as the Fibers class except of using a fixed gradient this one is shifting the whole time. So instead of drawing an gradient and place that on the stage over the fibers I have made a ChangingGradient class and I add that to the stage over the fibers.
The ChangingGradient class is very simple basicly. On every frame it takes some new colors that are close to the previous and redraws the gradient. But how to generate the color that is close to the previous? The answer is simple: A perlinnoise with the size of 1px x 1px! I have also putted that in a class and added a get nextColor and get color. With nextColor it generates the next color and returns it. With color it just returns the current color. The great thing about perlinnoise is that it can not only create plain and simple black/white perlinnoise but also multicolor perlin noise. To make it just set the 7th parameter of the method to “7″ and the 8th parameter to “true”. On the nextColor call it just regenerates the perlinnoise with just a shift in the offsets.
So the ChangingGradient class just makes X ChangingColor objects and then on every frame it calls the nextColor of it and draws the gradient with X different colors.
ChangingGradient with 3 colors:
ChangingGradient with 5 colors:
And so instead of using a fixed gradient I use these and voilá my new header.
HeaderV2.zip

