Flint Particle System Forum - can i add emitters into pv3d boxes or planes2010-12-25T17:17:51+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
can i add emitters into pv3d boxes or planeshttp://flintparticles.org/forum/comments.php?DiscussionID=259&Focus=924#Comment_9242009-10-07T20:13:12+01:002010-12-25T17:17:51+00:00darkcodehttp://flintparticles.org/forum/account.php?u=252
Hello Richard Lord and community. I have a problem
i want a make a "letters spray can", i was thinking about use a collada model then attach the letters spray but i dont know who to do ...
i want a make a "letters spray can", i was thinking about use a collada model then attach the letters spray but i dont know who to do it because this time im using classes.
when i use particles i just add particles to a ColladaNode like this
particles = new Particles(); ColladaBase.addChild(particles);
this is my code, this code just trow a letters spray. feel free to use or edit
[SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")] public class FlintGeometrias extends BasicView { private var flintRenderer:PV3DRenderer; private var rocket:Emitter3D; private var cameraTarget:DisplayObject3D = DisplayObject3D.ZERO; private var previousMouseX:Number = 0; private var cameraYaw:Number = 0; public function FlintGeometrias() { flintRenderer = new PV3DRenderer( scene ); setupRocket(); startRendering(); stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_mouseMoveHandler); } private function setupRocket():void { rocket = new Emitter3D(); rocket.counter = new Steady( 50 ); rocket.addInitializer( new PV3DObjectClasses([NewWord]) ); rocket.addInitializer( new ScaleAllInit(.9, 1.4)); rocket.addInitializer( new Position( new LineZone( new Vector3D( 0, -500, 0 ), new Vector3D( 0, 0, 0) ) ) ); rocket.addInitializer( new Velocity( new ConeZone( Vector3D.ZERO, Vector3D.AXISY, 1, 500, 330 ) ) ); rocket.addInitializer( new Lifetime( 3.3 ) ); rocket.addInitializer( new Rotation(new Vector3D( 1, 1, 1 ),5,90)); rocket.addAction( new Age() ); rocket.addAction( new Move() ); rocket.addAction( new Accelerate( new Vector3D( 0, -50, 0 ) ) ); rocket.addAction( new LinearDrag( 0.5 ) ); rocket.addAction( new RandomDrift( 200, 0, 200 ) ); flintRenderer.addEmitter(rocket); rocket.start(); }
class NewWord extends TriangleMesh3D { public function NewWord() { super( null, new Array(), new Array(), null ); var letter:String="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789"; var word:Text3D = new Text3D(letter.charAt(Math.floor(Math.random()*letter.length)), new HelveticaBold(), new Letter3DMaterial(Math.floor(Math.random() * 16777215))); addChild(word); } }]]>