var flintImage:BitmapData = new FlintImage( 320, 80 ); var particlesImage:BitmapData = new FlintImage( 320, 80 );
var startEmitter:Emitter2D = new Emitter2D(); var particles:Array = Particle2DUtils.createPixelParticlesFromBitmapData( new FlintImage(337,225), startEmitter.particleFactory, 50, 75 ); startEmitter.addExistingParticles( particles, true );
startEmitter.counter = new Blast( 5000 ); startEmitter.addInitializer( new Lifetime( 10 ) ); startEmitter.addInitializer( new Position( new BitmapDataZone( flintImage, 40, 60 ) ) ); startEmitter.addAction( new Age( Quadratic.easeInOut ) ); startEmitter.addAction( new TweenToZone( new BitmapDataZone( particlesImage, 40, 60 ) ) );
var renderer:PixelRenderer = new PixelRenderer( new Rectangle( 0, 0, 500, 500 ) ); renderer.addEmitter( startEmitter ); addChild( renderer );
startEmitter.start();
I'm try to make animated logo, like at example, but add the color of the logo and transform of color clother to a destination object. This code is work, but logo is going to be only black and white, what is need to be added to code?]]>
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1272#Comment_12722010-07-27T08:09:09+01:002011-12-11T04:05:54+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
To modify the color during the tween, add a ColorChange action to the emitter. For example
startEmitter.addAction( new ColorChange( 0xFFFF6600, 0xFF0000FF ) );
ColorChange action to the emitter. For example
startEmitter.addAction( new ColorChange( 0xFFFF6600, 0xFF0000FF ) );]]>
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1273#Comment_12732010-07-27T08:24:40+01:002010-07-27T08:25:10+01:00Turichttp://flintparticles.org/forum/account.php?u=392
Richard, thank for the answer and cool particle engine :)
But color change is give only 2 colors, i want to make full-colors particle change, try to illustrate idea at ...
But color change is give only 2 colors, i want to make full-colors particle change, try to illustrate idea at image:
http://ib1.keep4u.ru/b/2010/07/27/9a/9aee382aa648cb84fa15214d2aa3e60a.jpg]]>
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1274#Comment_12742010-07-28T07:33:07+01:002010-07-28T07:33:48+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
That will require a custom action. The action would store the original color and target color for each particle in the particle's dictionary and then transform the color using a similar algorithm to ...
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1275#Comment_12752010-07-28T09:32:57+01:002011-12-11T04:05:54+00:00Turichttp://flintparticles.org/forum/account.php?u=392
action, like at http://flintparticles.org/forum/comments.php?DiscussionID=26&page=1#Item_0 ?
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1280#Comment_12802010-08-03T08:12:01+01:002010-08-03T08:12:22+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Sort of. You'll probably want a custom Initializer to set the start and end colors for each particle and store these in the particle's dictionary, and then a custom action similar to the ColorChange ...
Ryan Hodson wrote an article which contains some examples of custom actions and initializers at http://slekx.com/2009/12/flinteroids-advanced-flint-tutorial/.]]>
Bitmap Logo Tweenhttp://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1282#Comment_12822010-08-04T07:22:28+01:002011-12-11T04:05:54+00:00Turichttp://flintparticles.org/forum/account.php?u=392
thank a lot, i'll try it.