Flint Particle System Forum - Bitmap Logo Tween 2011-12-11T04:05:54+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1268#Comment_1268 2010-07-26T15:43:16+01:00 2010-07-27T07:56:47+01:00 Turic http://flintparticles.org/forum/account.php?u=392 import org.flintparticles.common.actions.Age; import org.flintparticles.common.counters.Blast; import org.flintparticles.common.energyEasing.Quadratic; import ... import org.flintparticles.common.actions.Age;
import org.flintparticles.common.counters.Blast;
import org.flintparticles.common.energyEasing.Quadratic;
import org.flintparticles.common.events.ParticleEvent;
import org.flintparticles.common.initializers.ColorInit;
import org.flintparticles.common.initializers.Lifetime;
import org.flintparticles.twoD.actions.TweenToZone;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.Position;
import org.flintparticles.twoD.particles.Particle2D;
import org.flintparticles.twoD.renderers.PixelRenderer;
import org.flintparticles.twoD.zones.BitmapDataZone;

import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.particles.Particle2DUtils;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.zones.RectangleZone;

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 Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1272#Comment_1272 2010-07-27T08:09:09+01:00 2011-12-11T04:05:54+00:00 Richard http://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 Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1273#Comment_1273 2010-07-27T08:24:40+01:00 2010-07-27T08:25:10+01:00 Turic http://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 Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1274#Comment_1274 2010-07-28T07:33:07+01:00 2010-07-28T07:33:48+01:00 Richard http://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 Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1275#Comment_1275 2010-07-28T09:32:57+01:00 2011-12-11T04:05:54+00:00 Turic http://flintparticles.org/forum/account.php?u=392 action, like at http://flintparticles.org/forum/comments.php?DiscussionID=26&page=1#Item_0 ? Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1280#Comment_1280 2010-08-03T08:12:01+01:00 2010-08-03T08:12:22+01:00 Richard http://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 Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1282#Comment_1282 2010-08-04T07:22:28+01:00 2011-12-11T04:05:54+00:00 Turic http://flintparticles.org/forum/account.php?u=392 thank a lot, i'll try it.