Flint Particle System Forum - Change the color on the fly? Thu, 23 Jun 2011 13:39:53 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Change the color on the fly? http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=331#Comment_331 http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=331#Comment_331 Thu, 28 Aug 2008 11:19:28 +0100 GertjanS
I would like to set the color of my sharedImage when ever I want. How do I do this?

thx ]]>
Change the color on the fly? http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=333#Comment_333 http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=333#Comment_333 Fri, 29 Aug 2008 07:59:03 +0100 Richard
The main way to change the color of a particle is by setting the color property of the particle, normally using an action or initializer that changes the color like colorChange and colorInit. This doesn't change the original image, but rather will affect each particle according to the color set for each. The color is applied as a color transform to the particle's image when rendering it.

The particle's color property only maps accurately if the base image for the particle is white - for display objects of other colors the color property of the particle will tint them but it won't produce an accurate color match. ]]>
Change the color on the fly? http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=344#Comment_344 http://flintparticles.org/forum/comments.php?DiscussionID=71&Focus=344#Comment_344 Mon, 01 Sep 2008 14:59:14 +0100 axel012345
I had the same problem, i create a class ColorChange ( startColor : Array, endColor : Array , energyRatio : Array ) .
You use it like this :
new ColorChange (
[ color1, color2, color3] ,
[ color2, color3, color4] ,
[ 0.6 , 0.9 , 1 ] );
So during 0.6 percent of the particle life will fade from color1 to color2 , during 0,3 from color2 to color3 and 0,1 from color3 to color4.

Very nice for fireworks etc.

Maybe we can add it to svn if need :). ]]>