Flint Particle System Forum - Two identical emitters/renderers - different result 2011-12-12T23:12:03+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Two identical emitters/renderers - different result http://flintparticles.org/forum/comments.php?DiscussionID=133&Focus=526#Comment_526 2008-11-18T16:23:05+00:00 2011-12-12T23:12:03+00:00 Jonsey http://flintparticles.org/forum/account.php?u=107 Hi, this might be ridicously simple to fix but I just can't find a solution to it. To me the two emitters and renderers are the same but the second emitter/renderer don't seem to generate the same ...
I've posted the code below.

-Thank you in advance.

-------

import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.RadialDot;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.zones.*;


var emitter:Emitter2D = new Emitter2D();

emitter.counter = new Steady( 1 );

emitter.addInitializer( new ImageClass( RadialDot, 2, 0xA6A6A6, "hardlight" ) );
emitter.addInitializer( new Lifetime( 11, 12 ) );
emitter.addInitializer( new Position( new LineZone( new Point( 100, 7 ), new Point( 600, 7 ) ) ) );
emitter.addInitializer( new Velocity( new PointZone( new Point( -5, 2 ) ) ) );
emitter.addInitializer( new ScaleImageInit( 0.5, 1.5 ) );


emitter.addAction( new Move() );
emitter.addAction( new DeathZone( new RectangleZone( 5, 5, 1290, 190 ), true ) );
emitter.addAction( new RandomDrift( -4, 3 ) );

var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
renderer.addEmitter( emitter );
addChild( renderer );

emitter.start();
emitter.runAhead( 15 );

var emitter2:Emitter2D = new Emitter2D();

emitter2.counter = new Steady( 1 );

emitter2.addInitializer( new ImageClass( RadialDot, 2, 0xA6A6A6, "hardlight" ) );
emitter2.addInitializer( new Position( new LineZone( new Point( 601, 7 ),new Point( 1291, 7 ) ) ) );
emitter2.addInitializer( new Velocity( new PointZone( new Point( 5, 2 ) ) ) );
emitter2.addInitializer( new ScaleImageInit( 0.5, 1.5 ) );

emitter2.addAction( new Move() );
emitter2.addAction( new DeathZone( new RectangleZone( 0, 0, 1292, 190 ), true ) );
emitter2.addAction( new RandomDrift( 4, 3 ) );

var renderer2:DisplayObjectRenderer = new DisplayObjectRenderer();
renderer2.addEmitter( emitter2 );
addChild( renderer2 );

emitter2.start();
emitter2.runAhead( 15 );]]>
Two identical emitters/renderers - different result http://flintparticles.org/forum/comments.php?DiscussionID=133&Focus=530#Comment_530 2008-11-20T09:23:51+00:00 2011-12-12T23:12:03+00:00 Richard http://flintparticles.org/forum/account.php?u=1 It doesn't look like the emitters create the same number of particles, but monitoring the number of particles shows that they do in fact create exactly the same number of particles. I think this is ... Two identical emitters/renderers - different result http://flintparticles.org/forum/comments.php?DiscussionID=133&Focus=531#Comment_531 2008-11-20T11:07:02+00:00 2011-12-12T23:12:03+00:00 Jonsey http://flintparticles.org/forum/account.php?u=107 Thank you so much Richard. I'll try it our right away.