Flint Particle System Forum - Old stars screensaver Sat, 26 May 2012 06:36:29 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Old stars screensaver http://flintparticles.org/forum/comments.php?DiscussionID=550&Focus=1881#Comment_1881 http://flintparticles.org/forum/comments.php?DiscussionID=550&Focus=1881#Comment_1881 Mon, 30 Jan 2012 09:46:47 +0000 okp
a total-beginner question...
I'd like to reproduce the old windows98 stars screensaver :
stars are emitted in the center region, and moved / scaled up towards the edges of the screen.

Seems really simple but i'm kinda lost with all thoses functionalities...

Thanks for your help ! ]]>
Old stars screensaver http://flintparticles.org/forum/comments.php?DiscussionID=550&Focus=1882#Comment_1882 http://flintparticles.org/forum/comments.php?DiscussionID=550&Focus=1882#Comment_1882 Tue, 31 Jan 2012 14:56:48 +0000 czyky
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.threeD.actions.*;
import org.flintparticles.threeD.emitters.Emitter3D;
import org.flintparticles.threeD.initializers.*;
import org.flintparticles.threeD.renderers.*;
import org.flintparticles.threeD.zones.*;

[SWF(width='400', height='400', frameRate='30', backgroundColor='#000000')]
var emitter:Emitter3D = new Emitter3D();
emitter.counter = new Steady( 150 );

emitter.addInitializer( new ImageClass( Dot, 1) );
emitter.addInitializer( new ColorInit( 0xFFFFffff, 0xFFFFffff ) );
emitter.addInitializer( new Position( new PointZone( new Vector3D( stage.width / 2, stage.height / 2, 1000 )) ) );
emitter.addInitializer( new Velocity( new DiscZone( new Vector3D( -1, -1, -250 ), new Vector3D( 1, 1, -250 ), 30 ) ) );
emitter.addInitializer( new Lifetime( 4, 4 ) );

emitter.addAction( new Age() );
emitter.addAction( new Move() );

var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 400, 400 ) );
renderer.addEmitter( emitter );
addChild( renderer );
emitter.start(); ]]>