Flint Particle System Forum - Fireworks & Papervision 2010-12-25T18:21:56+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Fireworks & Papervision http://flintparticles.org/forum/comments.php?DiscussionID=275&Focus=975#Comment_975 2009-11-17T06:33:30+00:00 2010-12-25T18:21:56+00:00 ptaranto http://flintparticles.org/forum/account.php?u=269 I'm trying to adapt the Fireworks example to use it with papervision, but I would like have a little bit more uniform distribution on a sphere or disk zones like in the example ...
http://clockmaker.jp/blog-en/2008/09/pv3d-fireworks/
demo: http://clockmaker.jp/labs/as3_pv3d_gw_fireworks/main.swf

Here are my code for the DiskBang:

public class DiscBang extends Emitter3D
{
public function DiscBang( position : Point3D, color : uint )
{
counter = new Blast( 50 );

addInitializer( new ColorInit(color, color) );
addInitializer( new Position( new PointZone( position ) ) );
addInitializer( new Velocity( new DiscZone( Point3D.ZERO, Vector3D.AXISZ, 100 ) ) );
addInitializer( new Lifetime( 3 ) );

addAction( new Age( Quadratic.easeIn ) );
addAction( new Move() );
addAction( new Fade() );
//addAction( new Accelerate( new Vector3D( 0, -50, 0 ) ) );
addAction( new LinearDrag( 1 ) );
}
}

and for SphereBang:

public class SphereBang extends Emitter3D
{
public function SphereBang( position : Point3D, color : uint = 0xFFFF0000 )
{
counter = new Blast( 50 );

addInitializer( new ColorInit(color, color) );
addInitializer( new Position( new PointZone( position ) ) );
addInitializer( new Velocity( new SphereZone( Point3D.ZERO, 100 ) ) );
addInitializer( new Lifetime( 3 ) );

addAction( new Age( Quadratic.easeIn ) );
addAction( new Move() );
addAction( new Fade() );
//addAction( new Accelerate( new Vector3D( 0, -50, 0 ) ) );
addAction( new LinearDrag( 0.5 ) );
}
}

Here are the results I'm having:
http://pedrotaranto.com.br/labs/flint/fireworks_disk.swf
http://pedrotaranto.com.br/labs/flint/fireworks_sphere.swf

I've tried to use more actions like Explosion and SpeedLimit without success.
There is any action I'm missing to help me or any parameter I should adjust?

Thanks in advance for the help.

Cheers,

--
Pedro Taranto]]>
Fireworks & Papervision http://flintparticles.org/forum/comments.php?DiscussionID=275&Focus=981#Comment_981 2009-11-21T20:02:57+00:00 2010-12-25T18:21:56+00:00 Richard http://flintparticles.org/forum/account.php?u=1 The sphere and disc zones take an inner and outer radius. Try this addInitializer( new Velocity( new DiscZone( Point3D.ZERO, Vector3D.AXISZ, 100, 100 ) ) ); and this addInitializer( new ...
addInitializer( new Velocity( new DiscZone( Point3D.ZERO, Vector3D.AXISZ, 100, 100 ) ) );

and this

addInitializer( new Velocity( new SphereZone( Point3D.ZERO, 100, 100 ) ) );]]>
Fireworks & Papervision http://flintparticles.org/forum/comments.php?DiscussionID=275&Focus=988#Comment_988 2009-11-25T04:16:01+00:00 2010-12-25T18:21:56+00:00 ptaranto http://flintparticles.org/forum/account.php?u=269 Thanks, that did the trick