Flint Particle System Forum - I want to make some jet effects for my new project Tue, 13 Dec 2011 05:41:22 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher I want to make some jet effects for my new project http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1317#Comment_1317 http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1317#Comment_1317 Thu, 02 Sep 2010 07:51:37 +0100 JackLee I have to consider the gravity ,path,color fade, ......any ideas ]]> I want to make some jet effects for my new project http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1318#Comment_1318 http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1318#Comment_1318 Thu, 02 Sep 2010 08:50:11 +0100 JackLee
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 project http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1323#Comment_1323 http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1323#Comment_1323 Fri, 03 Sep 2010 08:37:00 +0100 Richard
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 this the sort of thing you're after?

import flash.geom.Point;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.counters.*;
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 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 project http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1327#Comment_1327 http://flintparticles.org/forum/comments.php?DiscussionID=391&Focus=1327#Comment_1327 Tue, 07 Sep 2010 06:27:48 +0100 JackLee
/*
* 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.
*/

package
{
import flash.display.Sprite;
import flash.filters.BlurFilter;
import flash.filters.ColorMatrixFilter;
import flash.geom.Point;
import flash.geom.Rectangle;
import org.flintparticles.common.actions.*;
import org.flintparticles.common.actions.Age;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.common.initializers.Lifetime;
import org.flintparticles.common.initializers.SharedImage;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.actions.Jet;
import org.flintparticles.twoD.actions.Move;
import org.flintparticles.twoD.activities.FollowMouse;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.initializers.Position;
import org.flintparticles.twoD.initializers.Velocity;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.renderers.BitmapRenderer;
import org.flintparticles.twoD.zones.*;
import org.flintparticles.twoD.zones.RectangleZone;


/**
* 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() );

emitter.addAction(new DeathZone(new RectangleZone(-20, -20, 800, 600), true));

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

anyway,Thank you for your generous share . ]]>