flint practice
practice!
/**
* Copyright about ( http://wonderfl.net/user/about )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/t5GO
*/
package
{
import flash.display.Sprite;
import flash.filters.BlurFilter;
import flash.filters.ColorMatrixFilter;
import flash.geom.Rectangle;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.renderers.BitmapLineRenderer;
import org.flintparticles.twoD.renderers.BitmapRenderer;
import org.flintparticles.twoD.renderers.PixelRenderer;
[SWF(width='465', height='465', backgroundColor='0')]
public class particle2 extends Sprite
{
private var emitter:Emitter2D;
public function particle2()
{
var renderer:BitmapLineRenderer = new BitmapLineRenderer( new Rectangle( 0, 0, 465, 465 ) );
renderer.addFilter( new BlurFilter( 4, 4, 1 ) );
renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.92,0 ] ) );
addChild( renderer );
emitter = new line( renderer );
renderer.addEmitter( emitter );
emitter.start();
}
}
}
import flash.display.DisplayObject;
import flash.geom.Point;
import org.flintparticles.common.actions.Age;
import org.flintparticles.common.counters.Steady;
import org.flintparticles.common.displayObjects.Line;
import org.flintparticles.common.initializers.ColorInit;
import org.flintparticles.common.initializers.Lifetime;
import org.flintparticles.common.initializers.SharedImage;
import org.flintparticles.twoD.actions.GravityWell;
import org.flintparticles.twoD.actions.Move;
import org.flintparticles.twoD.actions.RotateToDirection;
import org.flintparticles.twoD.activities.FollowMouse;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.Velocity;
import org.flintparticles.twoD.zones.DiscZone;
class line extends Emitter2D
{
public function line( renderer:DisplayObject )
{
counter = new Steady( 150 );
addInitializer( new ColorInit( 0xFFFF2200, 0xFFFFCC00 ) );
addInitializer( new Velocity( new DiscZone( new Point( 0, 0 ), 350,150 ) ) );
addInitializer( new Lifetime( 0.6, 0.6 ) );
addAction(new GravityWell(3000,0,0));
addAction(new GravityWell(3000,465,0));
addAction(new GravityWell(3000,0,465));
addAction(new GravityWell(3000,465,465));
addAction( new Age() );
addAction( new Move() );
addAction( new RotateToDirection() );
addActivity( new FollowMouse( renderer ) );
}
}