Flint Particle System Forum - FlarToolKit and FLiNT2010-12-25T16:55:15+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
FlarToolKit and FLiNThttp://flintparticles.org/forum/comments.php?DiscussionID=185&Focus=724#Comment_7242009-03-08T22:59:26+00:002010-12-25T16:55:15+00:00almogdesignhttp://flintparticles.org/forum/account.php?u=169
Hi I am trying to create a fireworks effect with Flint and the FlarToolKit , how would I start the emitter only when my base node for Flar is showing
any help would be appreciated. here is the good ...
any help would be appreciated. here is the good that I have so far. Thanks Almog
//Main Class public class MyExampleFlyingText extends PV3DARApp {
private var _plane:Plane;
private var orbitter:FirstPersonCamera; private var renderer:BitmapRenderer;
public function MyExampleFlyingText() { this.init('Data/camera_para.dat','Data/flarlogo.pat');
}
//Init protected override function onInit():void { super.onInit();
//Light var light:PointLight3D = new PointLight3D ; light.x = 0; light.y = 1000; light.z = -1000;
//Plane Base for Shape //var wmat:WireframeMaterial = new WireframeMaterial(0xff0000,1,2);// var wmat:FlatShadeMaterial = new FlatShadeMaterial(light,0xff22aa); this._plane = new Plane(wmat,85,85);// 80mm x 80mm this._plane.rotationX = 180;// this._baseNode.addChild(this._plane);// _baseNode addChild //Material for 3D text var material:Letter3DMaterial = new Letter3DMaterial(0x548000,1); material.interactive = true; material.doubleSided = true;
text3d = new Text3D("Heya", new HelveticaBold(), material); text3d.scale = .2; text3d.useOwnContainer = true; //text3d.rotationY=180; this._baseNode.addChild(text3d);
renderer.camera.position = new Vector3D(0,150,-400); renderer.camera.target = new Vector3D(0,150,0); renderer.camera.projectionDistance = 400; orbitter = new FirstPersonCamera(stage,renderer.camera); orbitter.start();
var emitter:Emitter3D = new Whizzer(new LineZone(new Vector3D(-200,0,0),new Vector3D(200,0,0))); renderer.addEmitter( emitter ); emitter.addEventListener( ParticleEvent.PARTICLE_DEAD, whizzBang, false, 0, true ); emitter.start();
emitter = new CatherineWheel(new Vector3D(200,200,50)); renderer.addEmitter(emitter); emitter.start();
emitter = new Candle(new Vector3D(150,0,150)); renderer.addEmitter( emitter ); emitter.start();
}
public function whizzBang( ev:ParticleEvent ):void { var bang:Emitter3D = new SphereBang(Particle3D(ev.particle).position); bang.addEventListener( EmitterEvent.EMITTER_EMPTY, removeEmitter, false, 0, true ); renderer.addEmitter( bang ); bang.start(); }
public function removeEmitter( ev:EmitterEvent ):void { Emitter3D(ev.target).removeEventListener( EmitterEvent.EMITTER_EMPTY, removeEmitter ); renderer.removeEmitter( Emitter3D( ev.target ) ); }
public function destroy():void { for each (var e:Emitter in renderer.emitters) { e.stop(); } }
} }]]>
FlarToolKit and FLiNThttp://flintparticles.org/forum/comments.php?DiscussionID=185&Focus=731#Comment_7312009-03-16T08:44:46+00:002009-03-16T08:44:58+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
I don't know the FlarToolkit, so can't be specific on this, but
emitterReference.start()
is what starts the emitter.
I don't know the FlarToolkit, so can't be specific on this, but
emitterReference.start()
is what starts the emitter.]]>
FlarToolKit and FLiNThttp://flintparticles.org/forum/comments.php?DiscussionID=185&Focus=738#Comment_7382009-03-24T21:43:45+00:002010-12-25T16:55:15+00:00almogdesignhttp://flintparticles.org/forum/account.php?u=169
Hi yea the emitter starts I am having issues trying to add it to the base node.