Orion Particle Engine
- Compatibility: Flash Player 9 and later (ActionScript 3.0)
- File Size: About 2Mb
- Usage Size: 5.5kb+
Download Now (1.0.0)
What’s New
- Initial Release – Read below to find out more.
Description
Orion is an all around simple and flexible particle generator. I created Orion in order to have an easy method of creating and controlling particle effects. Orion is very fast and can handle thousands of particles and still keep frame rates high. It’s also very small weighing in at around 5.5kb.
Add Filters
It is also very modular and flexible. It was built with the filter mentality in mind. It comes bundled with a set of effect filters to alter how the particles act. For example, there is a GravityFilter, WindFilter, FadeFilter, etc. You can mix and match whatever filters you want to achieve the effect you’re looking for. Of course as you add more filters it can affect performance so don’t get upset when you add 50 filters and it’s not maintaining 50fps.
In addition to being able to combine filters you can easily create your own filters if you feel like you are lacking the correct look you’re going for. For now you can reference the GravityFilter for a simple example, I plan on having a proper example later.
Control Output
You can also control how and when particles will be emitted. Orion comes bundled with a BurstOutput, FunctionOutput, KeyDownOutput, TimedOutput, and a SteadyOutput. use the explorer below to experiment what each one can do for you. More often than not, you’ll be using SteadyOutput to keep a constant stream of particles going. Without an output class set, the default is to emit one particle every frame.
Control how it’s Rendered
The default method of displaying particles is using the display list built into Flash. But to enable some interesting bitmap effects you might want to turn to the BitmapRenderer. What this class does is draw all the particles to a bitmap which sometimes increase performance and allow for bitmap effects. Such as blur trails or glow effects etc.
Choose to fit your needs
There are 4 types of Orion to choose from. You can use the base class, or the Bitmap, Container or Mouse version.
OrionBitmap allows you to emit particles at a specific color based on a snapshot of whatever display object you desire. An example would be, you want particles to only emit on red dots in your UI, using OrionBitmap you could do just that.
OrionContainer gives you the ability to take a MovieClip and turn any child assets into particles. This could be used to animate explosions of a MovieClip in a very simple and unique way.
OrionMouse is in essence a mouse trailer. It will emit particles wherever the mouse is and even only when the mouse is moving.
All versions of Orion can use any of the output classes, filters or renderers. So the sky is really the limit of what you can achieve using Orion for your particle effects.
Explorer
Use the Explorer to experiment and test out all the features of Orion. The Orion Explorer also generates the code as you experiment so you can copy and paste it into your own application.
Demos
All source code for these demos is included with the download.
Animation Demo
Rocket Demo
Targets Test
Collision Test
Tween Test
Speed Test
Usage
The quickest way to use Orion is listed below. This will get Orion on the stage, using an asset from the library and outputting particles.
import cv.Orion;
var e:Orion = new Orion(LibraryAssetID, null, {settings:{lifeSpan:500, velocityXMin:-50, velocityXMax:50, velocityYMin:-50, velocityYMax:50}}, true);
e.x = 275;
e.y = 250;
this.addChild(e);
Documentation
Need Help?
Feel free to e-mail me a question. When you e-mail your question, please include a simplified FLA file (and any class files) that clearly demonstrates the problem and provide a brief explanation.
Author: Gabriel Mariani, (e-mail: gabriel -at- coursevector.com)
Copyright 2010, CourseVector (This work is subject to the terms here.)
No comments yet.