Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorGertjanS
- CommentTimeAug 28th 2008
Hi,
I would like to set the color of my sharedImage when ever I want. How do I do this?
thx -
- CommentAuthorRichard
- CommentTimeAug 29th 2008
Hi
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. -
- CommentAuthoraxel012345
- CommentTimeSep 1st 2008 edited
Hi
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 :).
1 to 3 of 3
