Flint Particle System Forum - I want to make some jet effects for my new project2011-12-13T05:15:03+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
I want to make some jet effects for my new projecthttp://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1317#Comment_13172010-09-02T07:51:37+01:002011-12-13T05:15:03+00:00JackLeehttp://flintparticles.org/forum/account.php?u=404
like some tail of missile or comet, could anybody give some hints for that.
I have to consider the gravity ,path,color fade, ......any ideas
I have to consider the gravity ,path,color fade, ......any ideas]]>
I want to make some jet effects for my new projecthttp://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1318#Comment_13182010-09-02T08:50:11+01:002010-09-03T08:37:28+01:00JackLeehttp://flintparticles.org/forum/account.php?u=404
I really need help
import flash.geom.Point;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
import ...
import flash.geom.Point; import org.flintparticles.common.actions.*; import org.flintparticles.common.counters.*; import org.flintparticles.common.displayObjects.Dot; import org.flintparticles.common.displayObjects.Line; import org.flintparticles.common.initializers.*; import org.flintparticles.twoD.actions.*; import org.flintparticles.twoD.activities.FollowMouse; import org.flintparticles.twoD.emitters.Emitter2D; import org.flintparticles.twoD.initializers.*; import org.flintparticles.twoD.renderers.*; import org.flintparticles.twoD.zones.*;
var txt:TextField = new TextField(); txt.text = "Move the mouse over this box."; txt.autoSize = "left"; txt.textColor = 0xFFFFFF; addChild( txt );
var emitter:Emitter2D = new Emitter2D(); emitter.counter = new Steady( 150 );
emitter.addInitializer( new SharedImage( new Dot(5)) ); emitter.addInitializer( new ColorInit( 0xFFFFCC00, 0xFF660000 ) ); emitter.addInitializer( new Velocity( new PointZone( new Point( 0, 0 ) ) ) ); emitter.addInitializer( new Lifetime( 0.2, 1) );
emitter.addAction( new Age() ); emitter.addAction( new Jet(10, 10, new PointZone(new Point(0, 0))) ); //emitter.addAction( new GravityWell(25, 100, 100) );
var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 400, 400 ) ); renderer.addFilter( new BlurFilter( 10, 10, 8 ) ); renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.95,0 ] ) ); renderer.addEmitter( emitter ); addChild( renderer );
emitter.addActivity( new FollowMouse( renderer ) );
emitter.start( );
I have no idea how this happened , how to use the jet]]>
I want to make some jet effects for my new projecthttp://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1323#Comment_13232010-09-03T08:37:00+01:002011-12-13T05:15:03+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
The Jet effect isn't for making the effect you're after, it's for applying an acceleration to particles in a particular area of the screen only, as if they were caught in a jet of air.
Is ...
The Jet effect isn't for making the effect you're after, it's for applying an acceleration to particles in a particular area of the screen only, as if they were caught in a jet of air.
var emitter:Emitter2D = new Emitter2D(); emitter.counter = new Steady( 1000 );
emitter.addInitializer( new SharedImage( new Dot(5)) ); emitter.addInitializer( new ColorInit( 0xFFFFCC00, 0xFF660000 ) ); emitter.addInitializer( new Position( new DiscZone( new Point( 0, 0 ), 5 ) ) ); emitter.addInitializer( new Lifetime( 0.2, 0.5) );
emitter.addAction( new Age() ); emitter.addAction( new Move() );
var renderer:BitmapRenderer = new PixelRenderer( new Rectangle( 0, 0, 400, 400 ) ); renderer.addFilter( new BlurFilter( 4, 4, 2 ), true ); renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.95,0 ] ), true ); renderer.addEmitter( emitter ); addChild( renderer );
emitter.addActivity( new FollowMouse( renderer ) );
emitter.start( );]]>
I want to make some jet effects for my new projecthttp://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1327#Comment_13272010-09-07T06:27:48+01:002011-12-13T05:15:03+00:00JackLeehttp://flintparticles.org/forum/account.php?u=404
Thanks Richard, today morning I saw your answer, I did tons of tests, I fund out those zone, action stuff are all for calculating, not to generate the effect as its name stands for.But I finally ...
/* * FLINT PARTICLE SYSTEM * ..................... * * Author: Richard Lord * Copyright (c) Richard Lord 2008-2010 * http://flintparticles.org/ * * Licence Agreement * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */
/** * This example creates fire and smoke using two emitters. * * <p>This is the document class for the Flex project.</p> */
public class Main extends Sprite { [Embed(source='assets/fireblob.swf', symbol='FireBlob')] public var FireBlob:Class; private var jetZone:RectangleZone;
public function Main() { var emitter:Emitter2D = new Emitter2D();
emitter.counter = new Steady( 100 );
emitter.addInitializer( new Lifetime( 1, 3 ) ); emitter.addInitializer( new Velocity( new DiscSectorZone( new Point( 100, 0 ), 45, 10, -Math.PI, 0 ) ) ); //emitter.addInitializer( new Position( new DiscZone( new Point( 0, 0 ), 3 ) ) ); emitter.addInitializer( new SharedImage( new FireBlob() ) );
emitter.addAction( new Age( ) ); emitter.addAction( new Move( ) ); jetZone = new RectangleZone(125, 75, 0, 0), emitter.addAction(new Jet(1, 0, jetZone)); //addAction( new LinearDrag( 1 ) ); emitter.addAction( new Accelerate( 0, 40 ) ); emitter.addAction( new ColorChange( 0xFFFFCC00, 0xff660000 ) ); emitter.addAction( new ScaleImage( 1, 3 ) ); emitter.addAction( new RotateToDirection() );
var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 800, 600 ) ); renderer.addFilter( new BlurFilter( 10, 10, 8 ) ); renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.95,0 ] ) ); renderer.addEmitter( emitter ); addChild( renderer );
emitter.addActivity( new FollowMouse( renderer ) ); emitter.start( ); } } } actually ,I just make a few change to the your fire and smoke example, for now its still raw, need to improve